I have the sqlite-table with ID field that is PRIMARY_KEY. I add the new record to database by the next code:
$textQuery = "INSERT INTO ".$table_name." VALUES ($numberRec,"."'".$a."'".",".$listNumbers.")";
$db->exec($textQuery);
Is there any simple way to define the number of last record to table in order to set $numberRec to needed value? Or I have to make SELECT and so on?
I believe you can do
$db->lastInsertId()