X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C4026D1B4B2 for ; Sun, 18 Apr 2004 14:35:27 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 88429-10 for ; Sun, 18 Apr 2004 14:35:12 -0300 (ADT) Received: from marsha.pcisys.net (unknown [216.229.32.146]) by svr1.postgresql.org (Postfix) with ESMTP id 0D85BD1DA57 for ; Sun, 18 Apr 2004 14:35:11 -0300 (ADT) Received: from [192.168.0.102] (moe.rbe45-11.cos.pcisys.net [216.229.45.11]) (authenticated bits=0) by marsha.pcisys.net (8.12.11/8.12.11) with ESMTP id i3IHYDOg018058 for ; Sun, 18 Apr 2004 11:34:13 -0600 (MDT) User-Agent: Microsoft-Entourage/10.1.4.030702.0 Date: Sun, 18 Apr 2004 11:35:08 -0600 Subject: Re: UPDATE - Changing Password From: Keary Suska To: Postgres-PHP Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/26 X-Sequence-Number: 2683 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"