mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-12 14:21:03 +00:00
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:
Regular → Executable
+8
-8
@@ -17,14 +17,14 @@ class MYSQLi_DB {
|
|||||||
return mysqli_query($this->connection, $query);
|
return mysqli_query($this->connection, $query);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
class mysqli_DB {
|
class mysql_DB {
|
||||||
var $connection;
|
var $connection;
|
||||||
function mysqli_DB() {
|
function mysql_DB() {
|
||||||
$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysqli_error());
|
$this->connection = mysql_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysql_error());
|
||||||
mysqli_select_db(SQL_DB, $this->connection) or die(mysqli_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) {
|
if ($p_transaction_safe) {
|
||||||
$p_query = 'START TRANSACTION;' . $p_query . '; COMMIT;';
|
$p_query = 'START TRANSACTION;' . $p_query . '; COMMIT;';
|
||||||
};
|
};
|
||||||
@@ -32,7 +32,7 @@ class mysqli_DB {
|
|||||||
foreach ($query_split as $command_line) {
|
foreach ($query_split as $command_line) {
|
||||||
$command_line = trim($command_line);
|
$command_line = trim($command_line);
|
||||||
if ($command_line != '') {
|
if ($command_line != '') {
|
||||||
$query_result = mysqli_query($GLOBALS["link"], $command_line);
|
$query_result = mysql_query($command_line);
|
||||||
if ($query_result == 0) {
|
if ($query_result == 0) {
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
@@ -42,7 +42,7 @@ class mysqli_DB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function query($query) {
|
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;
|
$database = new MYSQLi_DB;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$database = new mysqli_DB;
|
$database = new mysql_DB;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Regular → Executable
+1
-1
@@ -124,7 +124,7 @@ class Process {
|
|||||||
if(DB_TYPE) {
|
if(DB_TYPE) {
|
||||||
$result = $database->connection->multi_query($str);
|
$result = $database->connection->multi_query($str);
|
||||||
} else {
|
} else {
|
||||||
$result = $database->mysqli_exec_batch($str);
|
$result = $database->mysql_exec_batch($str);
|
||||||
}
|
}
|
||||||
if($result) {
|
if($result) {
|
||||||
header("Location: index.php?s=3");
|
header("Location: index.php?s=3");
|
||||||
|
|||||||
Reference in New Issue
Block a user