Hi,

Is it possible to obtain the last_insert_id() for a particular column in a particular table?
eg, say i wanted to obtain the last insert id of a column called id in table reference, something along the lines of:


last_insert_id(reference.id)

The reason I ask is because I want to initially insert values into two tables and then insert values into a third using the last_insert_id() from the first two tables. Obviously, the last_insert_id from the first insert is replaced by the last_insert_id from the second insert. This is all done in a perl script and I could store the first last_insert_id in a variable but I thought their might be a more elegant way round it?

tia
Rich



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to