Received: from main.cyclades.com (root@main.cyclades.com [208.138.19.2]) by hub.org (8.8.8/8.7.5) with ESMTP id NAA09125 for ; Fri, 26 Jun 1998 13:12:26 -0400 (EDT) Received: from cyclades.com (jp.cyclades.com [208.138.19.101]) by main.cyclades.com (8.8.5/8.8.5) with ESMTP id KAA13546 for ; Fri, 26 Jun 1998 10:26:15 -0700 Message-ID: <3593D866.7C23664E@cyclades.com> Date: Fri, 26 Jun 1998 10:20:38 -0700 From: Joao Paulo Felix Organization: Cyclades Corporation X-Mailer: Mozilla 4.05 [en] (Win95; I) MIME-Version: 1.0 To: "pgsql-general@postgreSQL.org" Subject: Updating multiple fields Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 ________________________________________________________________