PHP 4.0 and Postgres Update problems
| From: | William Moore | Date: | Thu, 15 Jun 2000 02:18:29 +0000 |
| Subject: | PHP 4.0 and Postgres Update problems | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-428@lists.php.net to get a copy of this message | ||
Hello, I was wondering if someone could help me out with a slight problem
that I am having with updating a table in a php script. Basiclly I have a
class methood (update) that cycles through $HTTP_POST_VARS, and compares
that array with the contents of the object created from that class.
Depending on what has changed it genorates a SQL statement to update only
those fields. Everything works to the point of actually performing the
query. When I print the SQL statement out to verify that it is correct,
it is and I come up with something along the lines of
UPDATE user_table SET name='blahblah', phone='blahblah' WHERE uid=1.
If I copy/paste this directly to psql it works just like you would expect,
however when running this through pg_exec( ), it updates ALL rows in the
table to these values. Any ideas, or has anybody seen this before? I've
read over FAQ's, tutorials, readme's but can't find anything to figure out
why this would happen.