[sf-perl] Going from XML to SQL
mattalbright at yahoo.com
Fri Apr 1 09:45:50 PST 2005
We're on 7.x here, and we use:
select currval($tablename . '_id_seq')
We can do this because all of our tables are created through one
interface, and they always have a column: "id serial primary
And of course the above sql statement is abstracted behind a
method that's called "get_last_insert_id", and that method
checks that you're in a transaction at the time, and dies if it
If we ever upgrade to 8.x it could probably be changed, but it's
only in one place so it would be trivial.
--- David Wheeler <david at kineticode.com> wrote:
> On Mar 31, 2005, at 5:59 PM, Shane Hill wrote:
> > my $id =
> > $table_name is defined and assigned.
> > the docs say this is ok, how am I screwing up?
> How is the ID generated? What does your ID column declaration
> like? Do you use a sequence?
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
More information about the SanFrancisco-pm