Updating multiple fields - Mailing list pgsql-general

From Joao Paulo Felix
Subject Updating multiple fields
Date
Msg-id 3593D866.7C23664E@cyclades.com
Whole thread Raw
List 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 by date:

Previous
From: Moufida MASSRALI
Date:
Subject: ...
Next
From: lynch@lscorp.com (Richard Lynch)
Date:
Subject: Re: [GENERAL] Updating multiple fields