Re: AutoIncrement Database Fields for MySQL and PostGreSQL

2005-04-11 Thread Bob Showalter
Siegfried Heintze wrote: Thanks. I see that works for mysql. "my $lastid = $dbh->{mysql_insertid};" Is this a feature of MySQL or DBI? It's a feature of MySQL, via the DBD::mysql driver. If it is not a feature of DBI, will it work for PostGreSQL? No, but there is a similar feature. Read the docs fo

RE: AutoIncrement Database Fields for MySQL and PostGreSQL

2005-04-11 Thread Siegfried Heintze
Thanks. I see that works for mysql. "my $lastid = $dbh->{mysql_insertid};" Is this a feature of MySQL or DBI? If it is not a feature of DBI, will it work for PostGreSQL? Thanks, Siegfried -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: AutoIncrement Database Fields for MySQL and PostGreSQL

2005-04-11 Thread Bob Showalter
Siegfried Heintze wrote: If I use the auto-increment feature for a couple of normalized relations, how do I insert into them? Specifically, when I insert into a relation with the autoincrement feature on the primary key, how do I get the value of the index on the newly created row so I can use that

Re: AutoIncrement Database Fields for MySQL and PostGreSQL

2005-04-11 Thread toolscripts
'Perl Beginners'" Sent: Monday, April 11, 2005 4:18 PM Subject: AutoIncrement Database Fields for MySQL and PostGreSQL > If I use the auto-increment feature for a couple of normalized relations, > how do I insert into them? > > Specifically, when I insert into a relation w

AutoIncrement Database Fields for MySQL and PostGreSQL

2005-04-11 Thread Siegfried Heintze
If I use the auto-increment feature for a couple of normalized relations, how do I insert into them? Specifically, when I insert into a relation with the autoincrement feature on the primary key, how do I get the value of the index on the newly created row so I can use that the value of a foreign