Thread: Lowercase problem

Lowercase problem

From
"Julio Cuz, Jr."
Date:
Hi--

I don't know where the problem resides, but when I call a table or a field
name from Postgresql using PHP4, it treats the string ALL LOWERCASE, so I
get an error about 'field/table not relational..." do you know where the
problem is?

P.S.  Some tables have upper and lowercase, as well as field names...I had
to transfer everything to lowercase to get it working.

Julio Cuz, Jr.
Riverside Community College
jcuz@rccd.cc.ca.us


Re: Lowercase problem

From
"Mitch Vincent"
Date:
Try quoting your table names.

SELECT * FROM "WHATEVER";

-Mitch

----- Original Message -----
From: "Julio Cuz, Jr." <jcuz@rccd.cc.ca.us>
To: <pgsql-php@postgresql.org>; <php-db@lists.php.net>
Sent: Monday, February 05, 2001 12:25 PM
Subject: [PHP] Lowercase problem


> Hi--
>
> I don't know where the problem resides, but when I call a table or a field
> name from Postgresql using PHP4, it treats the string ALL LOWERCASE, so I
> get an error about 'field/table not relational..." do you know where the
> problem is?
>
> P.S.  Some tables have upper and lowercase, as well as field names...I had
> to transfer everything to lowercase to get it working.
>
> Julio Cuz, Jr.
> Riverside Community College
> jcuz@rccd.cc.ca.us
>
>


Re: Lowercase problem

From
"Brent R. Matzelle"
Date:
Postgre uses only lowercase table names.  Even if you created
the table with uppercase letters, the database converts them to
lowercase.  I'm not sure if that is your problem in any case.  I
could help you better if you provided your query code and the
error results.

Brent

--- "Julio Cuz, Jr." <jcuz@rccd.cc.ca.us> wrote:
> Hi--
>
> I don't know where the problem resides, but when I call a
> table or a field
> name from Postgresql using PHP4, it treats the string ALL
> LOWERCASE, so I
> get an error about 'field/table not relational..." do you know
> where the
> problem is?
>
> P.S.  Some tables have upper and lowercase, as well as field
> names...I had
> to transfer everything to lowercase to get it working.
>
> Julio Cuz, Jr.
> Riverside Community College
> jcuz@rccd.cc.ca.us
>


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

Crazy PHP-> PostgreSQL errors

From
"Mitch Vincent"
Date:
Warning: 11 is not a valid PostgreSQL result resource in
/usr/site/php/classes/db_pgsql.inc on line 62

Ok, this is a bit nasty.. All of the sudden I'm getting all kinds of the
above errors in my PHP code (code that's worked forever).. It happens on
both PG 7.0.2, 7.0.3 and 7.1 Beta 4 with both Apache 1.3.14 and 1.3.17..

It recently started happening on one of our production servers when it was
taken to PHP 4.0.4pl1 from 4.0.3. I'm not positive where it started
happening with my development server as the application effected hasn't been
worked on for a while..

Between my development server and our effected production server we're using
two totally different PgSQL classes for database access and both have been
stable for a long, long time so I'm pretty sure it's not out PHP code...

It doesn't appear that the backend is crashing.. I get no message that it
exited abnormally, I swear it's like I'm calling pg_close() somewhere (but
I'm not)..

I'm at a loss as to how to debug this, it _appears_ to be PHP 4.0.4pl1
that's doing something crazy but I'll be damned if I can see what it is..
Before it was limited to my development server but after going to PHP
4.0.4pl1 on a production server this started to show up everywhere..

Any ideas/comments/insights would be appreciated!

-Mitch





Re: Crazy PHP-> PostgreSQL errors

From
GH
Date:
On Mon, Feb 05, 2001 at 01:02:02PM -0500, some SMTP stream spewed forth:
> Warning: 11 is not a valid PostgreSQL result resource in
> /usr/site/php/classes/db_pgsql.inc on line 62
>
> Ok, this is a bit nasty.. All of the sudden I'm getting all kinds of the
> above errors in my PHP code (code that's worked forever).. It happens on
> both PG 7.0.2, 7.0.3 and 7.1 Beta 4 with both Apache 1.3.14 and 1.3.17..
>
> It recently started happening on one of our production servers when it was
> taken to PHP 4.0.4pl1 from 4.0.3. I'm not positive where it started
> happening with my development server as the application effected hasn't been
> worked on for a while..
>
> Between my development server and our effected production server we're using
> two totally different PgSQL classes for database access and both have been
> stable for a long, long time so I'm pretty sure it's not out PHP code...
>
> It doesn't appear that the backend is crashing.. I get no message that it
> exited abnormally, I swear it's like I'm calling pg_close() somewhere (but
> I'm not)..

Are you using persistent connections?
Are the config files essentially the same (relating to PostgreSQL, of
course)?

>
> I'm at a loss as to how to debug this, it _appears_ to be PHP 4.0.4pl1
> that's doing something crazy but I'll be damned if I can see what it is..

Would it be possible for you to send perhaps an example of what is
causing the error (i.e. test case)?

We just switched from 4.0.3 to 4.0.4pl1, but not on our production
machines, and I have seen no such behavior (using non-persistent
connections).


Good luck!

gh

> Before it was limited to my development server but after going to PHP
> 4.0.4pl1 on a production server this started to show up everywhere..
>
> Any ideas/comments/insights would be appreciated!
>
> -Mitch




Re: Crazy PHP-> PostgreSQL errors

From
GH
Date:
On Mon, Feb 05, 2001 at 01:02:02PM -0500, some SMTP stream spewed forth:
> Warning: 11 is not a valid PostgreSQL result resource in
> /usr/site/php/classes/db_pgsql.inc on line 62
>
> Ok, this is a bit nasty.. All of the sudden I'm getting all kinds of the
> above errors in my PHP code (code that's worked forever).. It happens on
> both PG 7.0.2, 7.0.3 and 7.1 Beta 4 with both Apache 1.3.14 and 1.3.17..
>
> It recently started happening on one of our production servers when it was
> taken to PHP 4.0.4pl1 from 4.0.3. I'm not positive where it started
> happening with my development server as the application effected hasn't been
> worked on for a while..
>
> Between my development server and our effected production server we're using
> two totally different PgSQL classes for database access and both have been
> stable for a long, long time so I'm pretty sure it's not out PHP code...
>
> It doesn't appear that the backend is crashing.. I get no message that it
> exited abnormally, I swear it's like I'm calling pg_close() somewhere (but
> I'm not)..

Are you using persistent connections?
Are the config files essentially the same (relating to PostgreSQL, of
course)?

>
> I'm at a loss as to how to debug this, it _appears_ to be PHP 4.0.4pl1
> that's doing something crazy but I'll be damned if I can see what it is..

Would it be possible for you to send perhaps an example of what is
causing the error (i.e. test case)?

We just switched from 4.0.3 to 4.0.4pl1, but not on our production
machines, and I have seen no such behavior (using non-persistent
connections).


Good luck!

gh

> Before it was limited to my development server but after going to PHP
> 4.0.4pl1 on a production server this started to show up everywhere..
>
> Any ideas/comments/insights would be appreciated!
>
> -Mitch