I am using MySQL. I need to insert one row into a table first, then I need to get the id of the inserted row. The code looks somewhat like the following:
insert into mytable (column2, column3, column4) values('value2','value3','value4')or die(mysql_error());
Column1
is the
primary key
and it is auto-increment. So how to get the value of
column1
in the previous operation?