At 3:53 PM -0600 6/7/01, Sterin, Ilya wrote:
>Like Paul mentioned you need to use {mysql_insertid} instead since insert_id
>is deprecated.

The other thing is that insertid was a statement handle attribute.
However, if you issue your INSERT using $dbh->do(), you won't have
a statement handle!  So mysql_insertid can be used as a database
handle attribute.

>
>Ilya Sterin
>
>-----Original Message-----
>From: Dexter
>To: [EMAIL PROTECTED]; Paul DuBois
>Sent: 6/7/01 6:19 PM
>Subject: Re: Thanks All   on How to get last insert id using DBI
>
>I tried the $->{insertid} It does look alfully weird Ha, Ha
>Imeant  $sth->{insert_id} 
>I know when using PHP , simply uses the insert_id() function .
>
>thanks
>
>Dexter
>
>***********************************************
>
>I suppose not, it looks pretty weird.  You might have better luck with:
>
>$dbh->{mysql_insertid}
>
>At least, if you're using MySQL.
>
>Thanks
>
>Dexter
>
>
>
>----- Original Message -----
>From: "Paul DuBois" <[EMAIL PROTECTED]>
>To: "Dexter" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Thursday, June 07, 2001 2:07 PM
>Subject: Re: How to get last insert id using DBI
>
>
>>  At 5:03 PM -0700 6/7/01, Dexter wrote:
>>  >How do I get the last insert using DBi.
>>  >
>>  >I tried the $->{insertid}
>>  >but that doesnt work.
>>
>>  I suppose not, it looks pretty weird.  You might have better luck
>with:
>>
>>  $dbh->{mysql_insertid}
>>
>>  At least, if you're using MySQL.
>>
>>  >
>>  >Thanks
>>  >
>>  >Dexter
>>
>>
>>  --
>>  Paul DuBois, [EMAIL PROTECTED]


-- 
Paul DuBois, [EMAIL PROTECTED]

Reply via email to