Skip to content

[Error Handler] Uncaught Error: Call to undefined method DB::getLastErrno() #976

@hippoduck

Description

@hippoduck

When using the example error handler code exactly as it is, the update works, but the error in the title appears. Not sure why this is, all other queries work fine for me, just the error handling has this issue.

$db->where('login', 'admin')->update('users', ['firstName' => 'Jack']);

if ($db->getLastErrno() === 0)
    echo 'Update succesfull';
else
    echo 'Update failed. Error: '. $db->getLastError();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions