php - Storing Auto-Incremented ID when using PDO for MySQL -


i'm using pdo mysql. i'm inserting table has id field set autoincrement. i'd store value reuse in next line. how can this?

from php manual:

returns id of last inserted row, or last value sequence object, depending on underlying driver. example, pdo_pgsql requires specify name of sequence object name parameter.

return $db->lastinsertid('youridcolumn'); 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -