Closed harryleee closed 3 years ago
$result
is a PDOStatement object. You can call its rowCount()
to check out the error.
$result = $db->insert($this->table, $data);
if ($result->rowCount() > 0)
{
// Do something
}
I extended Medoo
with a class of mine that checks if there are errors after Medoo::exec()
and throws an exception.
i try to set a incorrect field.
so, I can only judge this way.
I even 'if' the code wherever use medoo, can't handle it at a time ? thanks.