Updating multiple fields

Поиск
Список
Период
Сортировка
От Joao Paulo Felix
Тема Updating multiple fields
Дата
Msg-id 3593D866.7C23664E@cyclades.com
обсуждение исходный текст
Список pgsql-general
Hello there,

I have the following fields description, info and title.
Is there a PostgreSQL query to update more than one field at the same
time?

Right now I have the following (I am using it with PHP, so please
desregard its code):

pg_Exec($conn, "UPDATE options SET description = '$description'
    WHERE product = '$product' AND title = '$old_title';");

pg_Exec($conn, "UPDATE options SET info = '$info'
    WHERE product = '$product' AND title = '$old_title';");

pg_Exec($conn, "UPDATE options SET title = '$title'
    WHERE product = '$product' AND title = '$old_title';");

Ultimately I would like to have one single query. Is it possible?

Thanks in advance for your help/pointers.

Regards,

JP

--
________________________________________________________________

Joao Paulo Felix
Interactive Media Coordinator

Cyclades Corporation                    voice: (510) 770-9727
41934 Christy Street                    fax: (510) 770-0355
Fremont, CA                             www.cyclades.com
________________________________________________________________

В списке pgsql-general по дате отправления:

Предыдущее
От: Moufida MASSRALI
Дата:
Сообщение: ...
Следующее
От: lynch@lscorp.com (Richard Lynch)
Дата:
Сообщение: Re: [GENERAL] Updating multiple fields