Hi,

I have a table of unique values in the following format:

CREATE TABLE categories (id INTEGER PRIMARY KEY, category UNIQUE TEXT)

I want inserts into this table to succeed, even though the corresponding
entry already exists. So I use inserts in the following format:

INSERT OR IGNORE INTO categories VALUES (NULL, ?)

However, if I follow this successful execution with a call to
sqlite3_last_insert_rowid() I don't get the rowid of row, which caused the
insert to be ignored, but one I preformed previously (which doesn't
necessarily have anything to do with this one.) This causes some relations
in my database model to break.

I know I could use INSERT OR FAIL and a subsequent SELECT, but that seems
awkward and like unnecessary code bloat to me. Additionally I kind of think,

this breaks the description and sense of sqlite3_last_insert_rowid().

SQlite version used is 3.3.16.

Is this intentional? Any suggestions or should I file a ticket for this?

Thanks!
Mike


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to