I’m having some difficulty with getting $EZSQL_ERROR to work. In the following snippet, the error message should be displayed, but it’s not, just blank output. Other times I get an error that the $EZSQL_ERROR variable doesn’t exist.
if($sql = $db->get_results("this is a bad query", ARRAY_A)) {
// do nothing as we are getting an error
} else {
if($EZSQL_ERROR) {
echo 'this is the ezsql error message';
}
}