RE: [PHP] Problem querying postgres

From: Date: Fri, 13 Aug 2004 17:47:44 +0000
Subject: RE: [PHP] Problem querying postgres
Groups: php.general 
Request: Send a blank email to php-general+get-193726@lists.php.net to get a copy of this message
[snip] I am new to postgres using PHP. I have gotten PHP POSTGRES and PHPADMIN installed and have a database setup using PHPADMIN. The problem that I am having is that when I connect to postgres outside of PHPADMIN and try use pg_query() to do a select such as "SELECT PersonID FROM person" the string that is sent is "select personid from person". Now this is a problem because in the data base the field PersonID is not the same case as in the select that is sent and I get the error Warning: pg_query(): Query failed: ERROR: column "personid" does not exist in /Users/jcapy2/Sites/Jesper/SyncPosgresToMbrMaxData.php on line 70 If I change the field to all lower case in the database this does not happen. Also I can isue this select within PHPADMIN and it does work! Can anyone tell me where the setting(s)are that are controling how php is sending strings? [/snip] Have you echo'd back the query? AFAIK PHP makes no changes to case when it sends a query.

« previous php.general (#193726) next »