]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/donate/templates/default/db-connect.inc.php.erb
Bump cookstyle from 6.15.5 to 6.15.9
[chef.git] / cookbooks / donate / templates / default / db-connect.inc.php.erb
index ce05bc99f57954b18e99a8aad0e3c1b09514941b..c4cea1f935a30c1a369fdad68123fab895bb0f36 100644 (file)
@@ -1,4 +1,8 @@
 <?php
 <?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->report_mode = MYSQLI_REPORT_ERROR;
+$_DB_H->query('set @@sql_mode = \'\'');
+$_DB_H->query('SET NAMES \'utf8\'');