This commit is contained in:
troy grunt 2021-04-01 22:08:16 +02:00
parent c414ec0917
commit c13739e81f

14
sql.php
View File

@ -39,20 +39,19 @@ class SQL {
foreach ( $t as $i => $c ) {
switch ($c) {
case 's' :
$v [] = "'" . mysqli_real_escape_string ( $this->h, $c ) . "'";
$v [] = "'" . mysqli_real_escape_string ( $this->h, $p [$i] ) . "'";
break;
case 'i' :
$v [] = ( int ) $c;
$v [] = ( int ) $p [$i];
break;
case 'd' :
$v [] = ( double ) $c;
$v [] = ( double ) $p [$i];
break;
default :
//return false;
}
var_dump ( $q );
var_dump ( $t );
var_dump ( $p );
}
$res = array ();
switch (count ( $p )) {
case 0 :
@ -114,7 +113,6 @@ class SQL {
*/
return $res;
}
}
public function get($que, $t = '', $p = array ()) {
// echo $que;
$this->cnt_get ++;
@ -191,7 +189,7 @@ class SQL {
if (! $res) {
if (SQL_LOG)
fputs ( $this->f, mysqli_error () );
fputs ( $this->f, mysqli_error ( $this->h ) );
return false;
}