Error using update - Mailing list pgsql-general

From Pete Bass
Subject Error using update
Date
Msg-id 38B17006.D0967986@baedsl.co.uk
Whole thread Raw
Responses Re: [GENERAL] Error using update  (Charles Tassell <ctassell@isn.net>)
Re: [GENERAL] Error using update  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
I'm running Postgres 6.3 with PHP 2 as a web based db application. The
web server is Apache, and the browser is Netscape 4.5

I have a problem with 'update'. A user updated a field (description) for

a single record, but instead of only the specified record being updated,

all the records had the same field updated.

the code used to update the field(s) for a record is:
 $result=pg_Exec($conn,"update $spr set $set where sprid='$sprid'");

It appears that in this case the condition (i.e. where sprid='$sprid')
has been ignored, although previously and subsequently no multiple
updates have been obtained.

Has anyone any ideas?

Also, is it possible to return the number of rows that have been
updated?

Many thanks,

Pete Bass


pgsql-general by date:

Previous
From: Jim Mercer
Date:
Subject: Re: [GENERAL] No pg_hba.conf entry ???
Next
From: "Paulo Parola"
Date:
Subject: Re: No pg_hba.conf entry ???