Re: insert question

2009-02-24 Thread Michael Dykman
On Tue, Feb 24, 2009 at 8:53 PM, PJ wrote: > Is there a way to insert several rows into a table with one statement? > I have this: > $sql2 = "INSERT INTO authors >(first_name, last_name, ordinal) VALUES > ('$first_nameIN', '$last_nameIN', '1')"; >$result2 = mysql_query(

RE: INSERT question...

2001-03-07 Thread Johnny Withers
After doing an INSERT, you may do SELECT last_insert_id(); and it will return the last id the last INSERT command used. it doesn't matter if your MySQL server is very busy doing inserts, if you call 'SELECT last_insert_id()' right after the INSERT, you will get the correct value. last_insert_i