mysql - Using PHP, MySQLi and Prepared Statement, how I return the id of the inserted row? -


i want retrieve id of inserted row in database, don't know how this.

i tried return using sql clause returning id, not works.

how can return id after insertion of row?

after calling execute() method on preparedstatement, id of insert row in insert_id attribute. read it.

$pstm->execute(); $pstm->insert_id; 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -