This a bit looks complicated, i want to get the id column value of the processed query.
example:
$qu = mysql_query("INSERT INTO msgs (msg,stamp) VALUES('$v1','$v2')");
i want to get the ID of this query after storing the infos in database.
if it’s impossible, is getting the last ID record and adding 1 will be safe and guaranteed?
Note: i use PHP and mySQL
Thanks
If you are using standard mysql in PHP, all you have to do, is to use
mysql_insert_id()which takes resource$linkas parameter (your mysql connection)http://php.net/manual/en/function.mysql-insert-id.php
Basic usage: