On 4 Jan 2013, at 9:55am, Krzysztof <dib...@wp.pl> wrote:

> When I use INSERT OR IGNORE, if insertion fail (record exists),
> then sqlite3_last_insert_rowid does return nothing. Is exists similar
> solution which:
> 1. If insert success then return new rowid
> 2. If insert fail (record exists) then return rowid of existing record

No.  You are correct about how it works.  The best solution is to do the INSERT 
OR IGNORE as you're doing it already, then to use a SELECT to find the rowid.

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

Reply via email to