Skip site navigation (1) Skip section navigation (2)

Error using update

From: Pete Bass <Peter(dot)Bass(at)baedsl(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Error using update
Date: 2000-02-21 17:04:06
Message-ID: 38B17006.D0967986@baedsl.co.uk (view raw or flat)
Thread:
Lists: 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


Responses

pgsql-general by date

Next:From: Jim MercerDate: 2000-02-21 18:13:36
Subject: Re: [GENERAL] Re: No pg_hba.conf entry ???
Previous:From: Paulo ParolaDate: 2000-02-21 17:01:58
Subject: No pg_hba.conf entry ???

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group