Re: php update problems - Mailing list pgsql-general

From Andrew McMillan
Subject Re: php update problems
Date
Msg-id 39A2F2AC.6EB1AC63@catalyst.net.nz
Whole thread Raw
In response to php update problems  ("Mike Sears" <msears@vianet.ca>)
List pgsql-general
> Mike Sears wrote:
>
> Having a slight problem w/ my postgres database. for some reaons its
> no longer updating anymore, and for what reason I'm unsure
>
> if I'm right then the below "should" update the table I'm working in,
> though it doesn't. Is ther indeed something wrong here?
>
> <?
> require("dbconect.inc.php");
>
> $result = pg_exec($db,
>         "UPDATE news
> SET date='$date' topic='$topic' body='$body' person='$person'
> WHERE date='$date2' topic='$topic2' body='$body2' person='$person2'
> id2='$id';" );

UPDATE news SET date='$date', topic='$topic', body='$body',
person='$person' WHERE date='$date2' AND topic='$topic2' AND
body='$body2' AND person='$person2' AND id2='$id';

Cheers,
                    Andrew.
--
_____________________________________________________________________
            Andrew McMillan, e-mail: Andrew@cat-it.co.nz
Catalyst IT Ltd, PO Box 10-225, Level 22, 105 The Terrace, Wellington
Me: +64 (21) 635 694, Fax: +64 (4) 499 5596, Office: +64 (4) 499 2267

pgsql-general by date:

Previous
From: "Mike Sears"
Date:
Subject: php update problems
Next
From: "Mike Sears"
Date:
Subject: Re: php update problems