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