mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-14 08:36:09 +00:00
fix: mysqli_error needs MySQLi connection as parameter
This commit is contained in:
@@ -12,7 +12,7 @@ $noticeClass = array("Scout Report","Won as attacker without losses","Won as att
|
||||
</tr>
|
||||
</thead><tfoot>
|
||||
<tr><th><?php
|
||||
$MyGold = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error());
|
||||
$MyGold = mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
|
||||
$golds = mysqli_fetch_array($MyGold);
|
||||
$date2=strtotime("NOW");
|
||||
if ($golds['plus'] <= $date2) { ?>
|
||||
|
||||
@@ -35,7 +35,7 @@ $users = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM
|
||||
<tr>
|
||||
<td>Players online</td>
|
||||
<td><?php $t =time();
|
||||
$result = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE ".$t." - timestamp < 300") or die(mysqli_error());;
|
||||
$result = mysqli_query($GLOBALS["link"], "SELECT SQL_CACHE * FROM ".TB_PREFIX."users WHERE ".$t." - timestamp < 300") or die(mysqli_error($database->dblink));;
|
||||
$num_rows = mysqli_num_rows($result);
|
||||
echo $num_rows;?>
|
||||
</td>
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ class adm_DB {
|
||||
|
||||
function adm_DB(){
|
||||
global $database;
|
||||
$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysqli_error());
|
||||
mysqli_select_db($this->connection, SQL_DB) or die(mysqli_error());
|
||||
$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS) or die(mysqli_error($database->dblink));
|
||||
mysqli_select_db($this->connection, SQL_DB) or die(mysqli_error($database->dblink));
|
||||
}
|
||||
|
||||
function Login($username,$password){
|
||||
|
||||
Reference in New Issue
Block a user