mehr set sql
This commit is contained in:
parent
a38066cf10
commit
195a242976
16
sql.php
16
sql.php
@ -22,7 +22,7 @@ class SQL {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
public function get($que, $t = '', $p = array()) {
|
public function get($que, $t = '', $p = array ()) {
|
||||||
// echo $que;
|
// echo $que;
|
||||||
$this->cnt_get ++;
|
$this->cnt_get ++;
|
||||||
if (SQL_LOG)
|
if (SQL_LOG)
|
||||||
@ -85,14 +85,14 @@ class SQL {
|
|||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
public function single($que, $t = '', $p = array()) {
|
public function single($que, $t = '', $p = array ()) {
|
||||||
$data = $this->get ( $que, $t, $p );
|
$data = $this->get ( $que, $t, $p );
|
||||||
if ($data) {
|
if ($data) {
|
||||||
return $data [0];
|
return $data [0];
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
public function list($que, $t = '', $p = array()) {
|
public function list($que, $t = '', $p = array ()) {
|
||||||
$data = $this->get ( $que, $t, $p );
|
$data = $this->get ( $que, $t, $p );
|
||||||
if ($data) {
|
if ($data) {
|
||||||
$ret = array ();
|
$ret = array ();
|
||||||
@ -105,7 +105,7 @@ class SQL {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
public function set($que, $t = '', $p = array(), $id = false) {
|
public function set($que, $t = '', $p = array (), $id = false) {
|
||||||
// echo $que;
|
// echo $que;
|
||||||
$this->cnt_set ++;
|
$this->cnt_set ++;
|
||||||
$statement = $this->h->prepare ( $que );
|
$statement = $this->h->prepare ( $que );
|
||||||
@ -152,6 +152,14 @@ class SQL {
|
|||||||
break;
|
break;
|
||||||
case 11 :
|
case 11 :
|
||||||
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10] );
|
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10] );
|
||||||
|
case 12 :
|
||||||
|
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10], $p [11] );
|
||||||
|
case 13 :
|
||||||
|
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10], $p [11], $p [12] );
|
||||||
|
case 14 :
|
||||||
|
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10], $p [11], $p [12], $p [13] );
|
||||||
|
case 15 :
|
||||||
|
$statement->bind_param ( $t, $p [0], $p [1], $p [2], $p [3], $p [4], $p [5], $p [6], $p [7], $p [8], $p [9], $p [10], $p [11], $p [12], $p [13], $p [14] );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$statement->execute ();
|
$statement->execute ();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user