Re: [sqlite] rowid of the current insert

2009-12-14 Thread Tim Romano
You basically have this structure: MOVIES movieid, title PEOPLE peopleid, name MOVIEPEOPLE movieid, peopleid, role You insert a row into MOVIES and then insert one or more rows into PEOPLE and then you want to associate people with a movie in your MOVIESPEOPLE table. In order to do this,

Re: [sqlite] rowid of the current insert

2009-12-14 Thread Yuzem
Tim Romano wrote: > > You should keep your id and the imdbid in separate columns, because you > can then insert a title even if IMDB does not have it yet. > Ok, I have thought about this and it will be probably simpler to have two separated ids than using a trigger. Now, there are some

Re: [sqlite] rowid of the current insert

2009-12-10 Thread Tim Romano
You should keep your id and the imdbid in separate columns, because you can then insert a title even if IMDB does not have it yet. id INTEGER PRIMARY KEY imdbid integer// you should allow this column to be null title not null, et cetera Regards Tim Romano Yuzem wrote: > CREATE TABLE

Re: [sqlite] rowid of the current insert

2009-12-10 Thread Simon Davies
2009/12/10 Yuzem : > > CREATE TABLE movies(id integer,title text,unique(id)) > > Generally I have an unique id from imdb but some times the movie isn't > available. > I understand that there is a column called rowid that is the primary key. > I would like to insert the rowid

[sqlite] rowid of the current insert

2009-12-10 Thread Yuzem
CREATE TABLE movies(id integer,title text,unique(id)) Generally I have an unique id from imdb but some times the movie isn't available. I understand that there is a column called rowid that is the primary key. I would like to insert the rowid on the id column when I don't have an id for the