no tabs
This commit is contained in:
parent
af3d7d33a1
commit
79e27ee95a
14
sql.php
14
sql.php
@ -9,13 +9,13 @@ class SQL {
|
||||
public $cnt_set = 0;
|
||||
public function __construct() {
|
||||
require_once ('secret.php');
|
||||
|
||||
|
||||
$this->m = $_m;
|
||||
$this->pre = $_m ['pre'];
|
||||
$this->salt = $_m ['salt'];
|
||||
if (SQL_LOG)
|
||||
$this->f = fopen ( 'sql.log', 'w' );
|
||||
|
||||
|
||||
$this->h = new mysqli ( $_m ['host'], $_m ['user'], $_m ['pass'], $_m ['data'] );
|
||||
if ($this->h->connect_errno) {
|
||||
return false;
|
||||
@ -28,7 +28,7 @@ class SQL {
|
||||
if (SQL_LOG)
|
||||
fputs ( $this->f, str_replace ( array (
|
||||
"\n",
|
||||
" "
|
||||
" "
|
||||
), array (
|
||||
' ',
|
||||
''
|
||||
@ -73,9 +73,9 @@ class SQL {
|
||||
$statement->bind_param ( $t, $p );
|
||||
}
|
||||
$statement->execute ();
|
||||
|
||||
|
||||
$ret = array ();
|
||||
|
||||
|
||||
// print_r($statement);
|
||||
if (isset ( $statement->error ) && $statement->error != '') {
|
||||
if (SQL_LOG)
|
||||
@ -127,7 +127,7 @@ class SQL {
|
||||
if (SQL_LOG)
|
||||
fputs ( $this->f, str_replace ( array (
|
||||
"\n",
|
||||
" "
|
||||
" "
|
||||
), array (
|
||||
' ',
|
||||
''
|
||||
@ -176,7 +176,7 @@ class SQL {
|
||||
fputs ( $this->f, $statement->error );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if ($id) {
|
||||
return $statement->insert_id;
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user