There are two extra methods for SQLite that you are likely to find helpful. Firstly, the equivalent function of mysqli_insert_id() is lastInsertRowID(), and is a method on your open database connection. Remember that creating auto-incrementing fields in SQLite requires you to declare them as "INTEGER PRIMARY KEY" - the AUTO_INCREMENT keyword is not required. lastInsertRowID() will return the auto-increment ID number that was used for the last INSERT query you sent.
Secondly, the querySingle() method lets you execute an SQL query and get back the first column of the first row of the result of your query, which makes it extremely convenient for quick queries. If you set the second parameter to querySingle() to be true, then you get back an array of all the values that represent the first row of the result.