Possible Duplicate:
How can I fetch the last row I inserted using DBI?
I need to be able to call functions in mysql. One example is:
$dbh = DBI->connect(......)
$sqlQuery = "INSERT INTO xxx VALUES ......";
$sth = $dbh->prepare($sqlQuery);
$sth->execute();
#The missing code is here
#Call the function mysql_insert_id to retrieve the id of the last inserted record
#Do something with the id
How can I do this?