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
);
14 if ( $this->warning_count
) {
15 $result2 = $this->query('SHOW WARNINGS');
17 while ( $row = $result2->fetch_row() )
18 $out .= vsprintf("%s #%s: %s\n", $row);
19 throw new RuntimeException("MySQLi query() warning(s)\n".$out."\nQuery given was: \n".$q, E_USER_WARNING
);
25 public function prepare($q)
27 $result = parent
::prepare($q);
29 throw new RuntimeException("MySQLi prepare() error\n".$this->error
."\nQuery given was: \n".$q, E_USER_ERROR
);
35 public function getTotalQueries()