There is a function in mysqli, called mysqli_report(), which looks like a counterpart for PDO's setAttribute() method with its ERRMODE_* constants. The manual says:
MYSQLI_REPORT_STRICT
Throw mysqli_sql_exception for errors instead of warnings
So, having PDO::ERRMODE_EXCEPTION in mind, i tried this code 
mysqli_report(MYSQLI_REPORT_STRICT);
$mysqli->query("foo");
but, to my disappointment, it produced no exception nor warning at all.
So, here goes the question: is there a way to tell mysqli to throw exceptions without using MYSQLI_REPORT_ALL?
 
    