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
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
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
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
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
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
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