mkaratha <[EMAIL PROTECTED]> wrote:
Asume we have three tables:
CREATE TABLE ARTIST (Artistname TEXT UNIQUE)
CREATE TABLE SONG (SongTitle TEXT UNIQUE)
CREATE CHART(Artist INTEGER, Song INTEGER)
CHART.Artist should hold ARTIST.ROWID
CHART.Song should hold SONG.ROWID
Is it possible to do something like "INSERT INTO CHART(Artist, Song)
Values('Abba', 'Dancing Queen') + something to obtain the result
1. Insert (if not exists) 'Abba' into ARTIST
2. Insert (if not exists) 'Dancing Queen' into SONG
3. Insert into CHART with corresponding ROWID’s
sqlite3_changes() lets you know whether an insert has taken place.
sqlite3_last_insert_rowid() give you the ID of the most recently
inserted row.
Igor Tandetnik
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------