fix: mysqli_error needs MySQLi connection as parameter

This commit is contained in:
Martin Ambrus
2017-10-17 13:05:13 +02:00
parent 6ceb273163
commit ac5d3538f8
57 changed files with 178 additions and 178 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ include("constant.php");
class MYSQLi_DB {
var $connection;
function MYSQLi_DB() {
$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB) or die(mysqli_error());
$this->connection = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB) or die(mysqli_error($database->dblink));
}
function query($query) {
return mysqli_query($this->connection, $query);