ThingEngineer / PHP-MySQLi-Database-Class

Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.
Other
3.3k stars 1.34k forks source link

GetLast error not returning the errors #903

Open Harsheenajunejo opened 4 years ago

Harsheenajunejo commented 4 years ago

Error function is not working // Define database connection $db = new MysqliDb($db_host,$db_user,$db_pss,$db_name);

// Check if any error occur while establishing database connection. If yes, stop further processing.
if ($db->getLastErrno() != 0) {
    die("ERROR : -> ".$db->getLastError());
}

I have made $db_pass field as $db_pss in order to see the error message however it doesnt show the errors, please suggest what could be the reason

darkcavalry commented 4 years ago

Hello,

->getLastError(); function just returns query errors. You can check #783 for DB connection control example.