mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-07-25 01:01:57 -07:00
Making mysql trigger_error on query failure
This commit is contained in:
@@ -8,14 +8,12 @@
|
|||||||
function selectdb($dbname) {return mysql_select_db($dbname);}
|
function selectdb($dbname) {return mysql_select_db($dbname);}
|
||||||
|
|
||||||
function query($query){
|
function query($query){
|
||||||
// if($_GET[q])
|
|
||||||
// print "$query<br>";
|
|
||||||
$start=microtime(true);
|
$start=microtime(true);
|
||||||
if($res=mysql_query($query)){
|
if($res=mysql_query($query)){
|
||||||
$this->queries++;
|
$this->queries++;
|
||||||
$this->rowst+=@mysql_num_rows($res);
|
$this->rowst+=@mysql_num_rows($res);
|
||||||
} else {
|
} else {
|
||||||
// print mysql_error();
|
trigger_error("MySQL error: ". mysql_error(), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->time+=microtime(true)-$start;
|
$this->time+=microtime(true)-$start;
|
||||||
|
Reference in New Issue
Block a user