My issue with that is I need the rowid of the existing row back. Insert or
ignore doesn't seem to update the database's last_insert_rowid in the ignore
case, from what I've seen. Insert or Replace almost does it, but it
re-allocates the rowid, which breaks my referential integrity. Should the
I
If you'd have a unique index on that column then you could just use
"INSERT OR IGNORE ..."
Nico
--
-
To unsubscribe, send email to [EMAIL PROTECTED]
---
I would like to solicit ideas on this as well. An operation similar to
insert or replace, but that doesn't allocate a new row ID on replace (just
returns the old one through the last insert row ID.) Having to do the
search operation, and if it fails do an insert (or vice versa) doesn't seem
opti
Can you use the API call sqlite3_last_insert_rowid ?
-Original Message-
From: Weston Weems [mailto:[EMAIL PROTECTED]
Sent: Monday, January 22, 2007 3:58 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] SQLite last inserted id
What I'd ultimately like to do, and what I used to do w
What I'd ultimately like to do, and what I used to do with a sproc, is the
following
Pass a string to a sproc, it'll select from table where field = string
value, and if no records insert it and grab last inserted id.
That way with one call, I can ensure one string in db, and always get the an
i
5 matches
Mail list logo