I'm unsure of how to obtain the last insert id.
$sql ='INSERT INTO FOO (foo)values(?)';
$sth = $dbh->prepare($sql);
$insert_id = $dbh->lastInsertId;
How do I get the last insert id? I've seen this done without the
prepare, but I don't wish to alter that