Re: [sqlite] RE: Maintaining Master-Child relationships

2007-03-29 Thread stephan nies
t; > warn "Transaction aborted because $@"; > > > > # now rollback to undo the incomplete changes > > # but do it in an eval{} as it may also fail > > eval { $dbh->rollback }; > > > > # add other applica

Re: [sqlite] RE: Maintaining Master-Child relationships

2007-03-29 Thread stephan nies
$dbh->commit; > }; > > if ($@) { > warn "Transaction aborted because $@"; > > # now rollback to undo the incomplete changes > # but do it in an eval{} as it may also fail > eval { $dbh->rollback }; > > # add other application on-error-clean-up cod

Re: [sqlite] RE: Maintaining Master-Child relationships

2007-03-29 Thread stephan nies
iginal Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P > Kishor > Sent: 28 March 2007 17:42 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] RE: Maintaining Master-Child relationships > > > On 3/28/07, Arora, Ajay <[EMAIL PROTECTED]&g

Re: [sqlite] RE: Maintaining Master-Child relationships

2007-03-29 Thread P Kishor
ollback }; # add other application on-error-clean-up code here } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of P Kishor Sent: 28 March 2007 17:42 To: sqlite-users@sqlite.org Subject: Re: [sqlite] RE: Maintaining Master-Child relationships On 3/28/07, Arora, Ajay

Re: [sqlite] RE: Maintaining Master-Child relationships

2007-03-29 Thread Martin Jenkins
Arora, Ajay wrote: Can anyone please look into my query, I've tables Master ( id integer primary key, field1 text) And Child (id integer, name text) Might be worth looking for Celko's "Hierarchies in SQL". I've not read it but I've seen good reviews and Celko seems well

Re: [sqlite] RE: Maintaining Master-Child relationships

2007-03-28 Thread P Kishor
On 3/28/07, Arora, Ajay <[EMAIL PROTECTED]> wrote: Can anyone please look into my query, I've tables Master ( id integer primary key, field1 text) And Child (id integer, name text) My application receive values for field1 and name. I need to populate master and child with incoming

Re: [sqlite] RE: Maintaining Master-Child relationships

2007-03-28 Thread Mohd Radzi Ibrahim
Use sqlite3_last_insert_rowid - Original Message - From: "Arora, Ajay" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Thursday, March 29, 2007 12:19 AM Subject: [sqlite] RE: Maintaining Master-Child relationships Can anyone please look into my query

[sqlite] RE: Maintaining Master-Child relationships

2007-03-28 Thread Arora, Ajay
Can anyone please look into my query, I've tables Master ( id integer primary key, field1 text) And Child (id integer, name text) My application receive values for field1 and name. I need to populate master and child with incoming values using the same id. A quick reply will be