From: Keary Suska <hierophant@pcisys.net>
To: Postgres-PHP <pgsql-php@postgresql.org>
Subject: Re: UPDATE - Changing Password
Date: Sun, 18 Apr 2004 11:35:08 -0600
Message-ID: <BCA8186C.FC35%hierophant@pcisys.net> (raw)
In-Reply-To: <BAY14-F31cyJw78vrKa0005a58a@hotmail.com>
on 4/18/04 3:23 AM, yazkedoo@hotmail.com purportedly said:
> Fatal error: Call to undefined function: pg_affected_rows() in
> /home/webpages/yamkedoo/Tests/chpw1.php on line 55
This means that you are using a PHP version < 4.2.0 . Use pg_cmdtuples()
instead.
> if(pg_affected_rows($result)!=1)
> {
> print "Update Failed\n";
> exit;
> }
>
> as this is where the error is, then got "Update Successful", but the
> password had not been updated.
In this case, this just means that the query is either failing or not being
committed. 1) verify that the query should execute successfully--i.e. have
your script output the $query value and then use that in the command line
interface; 2) is the query executing in a transaction? There may be server
configurations forcing the issue. To make sure, send "COMMIT" before closing
the Db connection or ending the script. If you get a "no transaction" error,
then this isn't the problem.
Best regards,
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: hierophant@pcisys.net
Subject: Re: UPDATE - Changing Password
In-Reply-To: <BCA8186C.FC35%hierophant@pcisys.net>
References: <BAY14-F31cyJw78vrKa0005a58a@hotmail.com> <BCA8186C.FC35%hierophant@pcisys.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox