4 class debugmysqli
extends mysqli
8 public function query($q)
10 $result = parent
::query($q);
12 throw new RuntimeException("MySQLi query() error!\n".$this->error
."\nQuery given was: \n".$q, E_USER_ERROR
);
15 if ( $this->warning_count
) {
16 $result2 = $this->query('SHOW WARNINGS');
18 while ( $row = $result2->fetch_row() )
19 $out .= $row[0].' #'.$row[1].': '.$row[2]."\n";
20 throw new RuntimeException("MySQLi query() warning!\n".$out."\nQuery given was: \n".$q, E_USER_WARNING
);
26 public function prepare($q)
28 $result = parent
::prepare($q);
30 throw new RuntimeException("MySQLi prepare() error!\n".$this->error
."\nQuery given was: \n".$q, E_USER_ERROR
);
37 public function getTotalQueries()