Problems with pg_FieldNum

From: Date: Wed, 13 Feb 2002 15:11:53 +0000
Subject: Problems with pg_FieldNum
Groups: php.db 
Request: Send a blank email to php-db+get-16904@lists.php.net to get a copy of this message
Greetings, I am having trouble with the PostgreSQL pg_FieldNum() funciton. When I execute the following: $DB = pg_Connect ( "dbname=lists" ); $Recs = pg_Exec ( $DB, "SELECT 123 AS \"ABC\"" ); $FieldName = pg_FieldName ( $Recs, 0 ); print ( "<p>FieldName: $FieldName</p>" ); $FieldNum = pg_FieldNum ( $Recs, $FieldName ); print ( "<p>FieldNum: $FieldNum</p>" ); I get: FieldName: ABC FieldNum: -1 It seems that no matter what I pass to pg_FieldNum(), I get -1 (error) in return. Anyone spot what I am doing wrong? I am using PostgreSQL 7.0.2 and PHP 4.0.3 on RH Linux 7.0. Thanks, -Brady

« previous php.db (#16904) next »