Hello. I understand this may be a more MySQL based question but I was wondering if you can return the id or primary key/index of a newly inserted row in one step instead of two. Right now im doing
$sql = "INSERT INTO table (name, date) VALUES ($name, $date)"
$result = mysql_query($sql)
then
$sql = "SELECT * FROM table WHERE name='$name' AND date='$date' LIMIT 1"
And I am doing it that way. Just didnt know if there was a shorter way.
Thanks!