fix: mysql (without the "i") class returned to its original state

this got replaced by all those mysql-to-mysqli find and replace
mumbo-jumbo tricks :)
This commit is contained in:
Martin Ambrus
2017-08-29 10:49:36 +02:00
parent a08f329857
commit 298e6feb58
2 changed files with 9 additions and 9 deletions
Regular → Executable
+8 -8
View File
@@ -17,14 +17,14 @@ class MYSQLi_DB {
return mysqli_query($this->connection, $query);
}
};
class mysqli_DB {
class mysql_DB {
var $connection;
function mysqli_DB() {
$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysqli_error());
mysqli_select_db(SQL_DB, $this->connection) or die(mysqli_error());
function mysql_DB() {
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
mysql_select_db(SQL_DB, $this->connection) or die(mysql_error());
}
function mysqli_exec_batch ($p_query, $p_transaction_safe = true) {
function mysql_exec_batch ($p_query, $p_transaction_safe = true) {
if ($p_transaction_safe) {
$p_query = 'START TRANSACTION;' . $p_query . '; COMMIT;';
};
@@ -32,7 +32,7 @@ class mysqli_DB {
foreach ($query_split as $command_line) {
$command_line = trim($command_line);
if ($command_line != '') {
$query_result = mysqli_query($GLOBALS["link"], $command_line);
$query_result = mysql_query($command_line);
if ($query_result == 0) {
break;
};
@@ -42,7 +42,7 @@ class mysqli_DB {
}
function query($query) {
return mysqli_query($GLOBALS["link"], $query, $this->connection);
return mysql_query($query, $this->connection);
}
};
@@ -50,6 +50,6 @@ if(DB_TYPE) {
$database = new MYSQLi_DB;
}
else {
$database = new mysqli_DB;
$database = new mysql_DB;
}
?>