On Wed, 14 Apr 1999, Michael Davis wrote:

> The safest way is to select the nextval('seq_name') and then insert using
> this value.

I understand, I just thought something like, I do the insert, and then
grab the value with:

 $insertid = $sth->{'insertid'};


assuming field "insertid" was the one being updated by the sequence, but
that doenst seem to work.


> 
>       -----Original Message-----
>       From:   Brian [SMTP:[EMAIL PROTECTED]]
>       Sent:   Wednesday, April 14, 1999 2:59 PM
>       To:     [EMAIL PROTECTED]
>       Subject:        [GENERAL] How to get seq after insert
> 
> 
>       I have a sequence in a table that increments upon insert.  After
> doing the
>       insert, is their a way (function maybe?) to get the sequences value
>       without having to do another select?
> 
>       Brian
> 
> 
>       -----------------------------------------------------
>       Brian Feeny (BF304)     [EMAIL PROTECTED]   
>       318-222-2638 x 109      http://www.shreve.net/~signal      
>       Network Administrator   ShreveNet Inc. (ASN 11881)            
>       
> 

-----------------------------------------------------
Brian Feeny (BF304)     [EMAIL PROTECTED]   
318-222-2638 x 109      http://www.shreve.net/~signal      
Network Administrator   ShreveNet Inc. (ASN 11881)            

Reply via email to