List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:October 4 2001 8:37pm
Subject:Re: Auto Increment Fields
View as plain text  
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, paul@stripped
Thread
Auto Increment FieldsJason Frisvold4 Oct
  • RE: Auto Increment FieldsDon Read4 Oct
  • Re: Auto Increment FieldsPaul DuBois4 Oct
    • Re: Auto Increment FieldsKyle Hayes5 Oct
RE: Auto Increment FieldsJason Frisvold5 Oct