Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

getting last_insert_id

by palette (Scribe)
on Mar 28, 2007 at 14:18 UTC ( [id://607029]=perlquestion: print w/replies, xml ) Need Help??

palette has asked for the wisdom of the Perl Monks concerning the following question:

I am using DBIx::Class

$self->{schema}->populate('Order', [ [ qw/description subcode creationdate/], [ $element->severity."-".$element->message , + $element->completionCode, $current_date ]]);


I have a sequense for this table which will insert the value in the primary key field of this table ie; order_id.

Now after populating the table I want to get the the value inserted inthe primary key field.

Can anyone suggest what si the easiest way of doing this in DBIx::Class

Replies are listed 'Best First'.
Re: getting last_insert_id
by bobf (Monsignor) on Mar 28, 2007 at 15:02 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://607029]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-18 07:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found