last insert id for sqlite3 and mysql