|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18386 Select not case sensitive in pg_exec
Submitted: 2002-07-17 03:52 UTC Modified: 2002-07-17 04:27 UTC
From: roach_md at mindspring dot com Assigned:
Status: Not a bug Package: PostgreSQL related
PHP Version: 4.1.2 OS: Solaris 8
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: roach_md at mindspring dot com
New email:
PHP Version: OS:


 [2002-07-17 03:52 UTC] roach_md at mindspring dot com
My queries with case sensitive table names get submitted in all lower case through pg_exec.

postgresql 7.2

Error Log:

[17-Jul-2002 03:34:04] PHP Warning:  PostgreSQL query failed:  ERROR:  Attribute 'statecode' not found
 in /opt/apache/wwwroot/mytest.asp on line 10


echo "<BR><BR>Testing Database Connection<br>";
$connection = pg_connect ("host=myhost port=5432 dbname=$site_db
user=$site_user password=$site_pw");
if ($connection){
 echo "Connection Established <br>";
 $resultid = pg_exec ($connection, "SELECT StateCode FROM states");
 if ( $resultid ){
 $rows = pg_numrows($resultid);
 print $rows . "<br>";
 print "State" . "<select name=\"state\">";
 for ( $i = 0; $i < $rows; $i++ ){
        list($state) = pg_fetch_row($resultid,$i);
        print "<option>" . $state;
 print "</select><br>";
 print "Query Failed.";
 echo "<br>Could not connect to database.";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-17 04:28 UTC]
This is not a PHP bug. You need to enclose attributes in double quotes (") if you want the case preserved. 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 04:01:31 2024 UTC