Re: Last ID Problem

Поиск
Список
Период
Сортировка
От Mitch Pirtle
Тема Re: Last ID Problem
Дата
Msg-id 330532b605013114506f02ebaf@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Last ID Problem  (<operationsengineer1@yahoo.com>)
Ответы Re: Last ID Problem  (<operationsengineer1@yahoo.com>)
Список 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 по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Re: Last ID Problem
Следующее
От:
Дата:
Сообщение: Re: Last ID Problem