andre
02-14-2000, 10:44 AM
I have a slight problem with mysql. How do I get the values of the row I just inserted?
I have a table with two columns id (auto_increment) and names.
After I insert some values from a php page, eg:
$query="INSERT INTO table (names) VALUES ('johnboy')";
$res=mysql_query($query) or die("oops?");
How do I get the value of 'id' of that query? I am a little bit slow today and this is driving me mad at the moment. :(
I have a table with two columns id (auto_increment) and names.
After I insert some values from a php page, eg:
$query="INSERT INTO table (names) VALUES ('johnboy')";
$res=mysql_query($query) or die("oops?");
How do I get the value of 'id' of that query? I am a little bit slow today and this is driving me mad at the moment. :(