> I have no idea about the 'profile' thing, but since you want your statement 
>to end (i.e. return SQLITE_DONE) after the first retrieved record, I recommend 
>using 'LIMIT 1' in your query.

That's actually what I'm doing =)

Example:

# SELECT * FROM mytable WHERE key = ? ORDER BY userid DESC LIMIT 1;

But it's normal from SQLite's side: if there's only _one_ result, the
_first_ call to sqlite3_step() *will* return SQLITE_ROW whatsoever .
You still have to call step() a second time to get the SQLITE_DONE return value.

Guilaume
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to