Skip to content

Instantly share code, notes, and snippets.

@AnatoliyAkhmatov
Created February 1, 2021 12:12
Show Gist options
  • Save AnatoliyAkhmatov/d01d91dec81464c0cdabb8064100cb8f to your computer and use it in GitHub Desktop.
Save AnatoliyAkhmatov/d01d91dec81464c0cdabb8064100cb8f to your computer and use it in GitHub Desktop.
DB::getPdo()->lastInsertId();
@axis80
Copy link

axis80 commented Jan 5, 2022

Only works on inserts, not on updates. For updates it returns zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment