sql - Selecting Last Inserted Record with only knowing Table Name and Last Insert ID -


i have built database abstraction layer has functions create, read, update , delete, , want create function return record has been created. abstract function create looks like:

abstract function create($table, $values) 

which running through pdo object (in case), after assembling , executing insert query, available afterward table name, , last insert id value. so, there way select table inserted primary key equal last insert id, without knowing primary key column?


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -