donate: use mysqli
[chef.git] / cookbooks / donate / templates / default / db-connect.inc.php.erb
index ce05bc99f57954b18e99a8aad0e3c1b09514941b..c437acb5b928a2bda83acbb9aeb646301a7b686d 100644 (file)
@@ -1,4 +1,6 @@
 <?php
-$_DB_H = mysql_connect('localhost','donate','<%= @passwords['database'] %>');
-mysql_select_db('donate', $_DB_H);
-mysql_query('SET NAMES \'utf8\'', $_DB_H);
+$_DB_H = new mysqli('localhost','donate','<%= @passwords['database'] %>','donate');
+if ($_DB_H->connect_errno) {
+    die('DB Connect Error: ' . $_DB_H->connect_errno);
+}
+$_DB_H->query('SET NAMES \'utf8\'');