Re: Last ID Problem - Mailing list pgsql-novice

From Mitch Pirtle
Subject Re: Last ID Problem
Date
Msg-id 330532b605013114506f02ebaf@mail.gmail.com
Whole thread Raw
In response to Re: Last ID Problem  (<operationsengineer1@yahoo.com>)
Responses Re: Last ID Problem  (<operationsengineer1@yahoo.com>)
List pgsql-novice
This is the easiest way to do it:

   http://ask.slashdot.org/article.pl?sid=05/01/31/1441200&from=rss

This is using plain old SQL the PostgreSQL way ;-)

Basically you:

1) get the next number from the sequence
2) do the update
3) use that number for related table insterts

For an ADOdb example, this thread:

    http://www.phparch.com/discuss/index.php/t/372/0/

Says to use this syntax:

$insert_id = $db->getone("select currval('sequence_name')");

-- Mitch

pgsql-novice by date:

Previous
From:
Date:
Subject: Re: Last ID Problem
Next
From:
Date:
Subject: Re: Last ID Problem