Re: auto increment fields

2004-09-20 Thread SGreen
By replacing deleted records with new information, you run the risk of misidentifying data in related tables. What if you had a record in a table called "person" with an ID of 6 that belonged to Mary Jones. You delete it and create a new record 6 for Bob Mondo? Let's say you have a related tab

RE: auto increment fields

2004-09-19 Thread Osvaldo Sommer
Hi Mike: Instead off delete a record, i would put a status field to indicate that the record is deleted, and create a function that returns the key of the first record with the deleted status for reuse, and in case that there is no record to reuse, to create a new one and return that key. But you

Re: auto increment fields

2004-09-19 Thread Andrew Kreps
On Sun, 19 Sep 2004 23:59:02 +0300, Mike <[EMAIL PROTECTED]> wrote: > hi. > I have a rather childish question on tables and auto increment fields. > Scenario: I have a table with an field. The > deal is that everything works fine (I'm talking about the auto > incrementation part) > until I choose

Re: Auto Increment Fields

2001-10-05 Thread Kyle Hayes
On Thursday 04 October 2001 13:37, Paul DuBois wrote: > At 4:08 PM -0400 10/4/01, Jason Frisvold wrote: > >Is there a way to have DBI return the value of the auto-incremented field > >upon insert? Or do I have to insert and then do a select afterwards? > > $dbh->do ("your insert statement"); > $a

RE: Auto Increment Fields

2001-10-05 Thread Jason Frisvold
y, and I'm not sure about the former." -- Albert Einstein [1879-1955] -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 4:37 PM To: Jason Frisvold; '[EMAIL PROTECTED]' Subject: Re: Auto Increment Fields At 4:08 PM -0400

Re: Auto Increment Fields

2001-10-04 Thread Paul DuBois
At 4:08 PM -0400 10/4/01, Jason Frisvold wrote: >Is there a way to have DBI return the value of the auto-incremented field >upon insert? Or do I have to insert and then do a select afterwards? $dbh->do ("your insert statement"); $auto_inc = $dbh->{mysql_insertid}; -- Paul DuBois, [EMAIL PROTEC

RE: Auto Increment Fields

2001-10-04 Thread Don Read
On 04-Oct-2001 Jason Frisvold wrote: > Is there a way to have DBI return the value of the auto-incremented field > upon insert? Or do I have to insert and then do a select afterwards? > $sth->insertid; -- Don Read [EMAIL PROTECTED] -- It's always darkes