|
Posted by newbie on 07/20/07 07:44
I am writing a DB like this:
---------------------------------------------------------------------
| id (auto_incremented filed) | foo | bar |
---------------------------------------------------------------------
$sql_query = "INSERT INTO `table` (`foo`, `bar`) VALUES ('$string_1',
'$string_2')";
mysql_query($sql_query, $db_handle);
//how can I get id for the above inserted entry? is that possible I
get it with a single mysql instruction?
since each time I write a record into mysql, 'id' is incremented,
how can I get the id that an insertion corresponds to (can I get it
with a single mysql instruction)?
Thanks,
[Back to original message]
|