Re: PEAR Problem

From: "Papp Gyozo" <pgerzson(at)freestart(dot)hu>
To: "Gurudutt" <guru(at)indvalley(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Cc: <pgsql-php(at)postgresql(dot)org>
Subject: Re: PEAR Problem
Date: 2001-10-08 22:14:43
Message-ID: 00cf01c15046$a25fba80$01fdfea9@jaguar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php pgsql-sql

Hi,

maybe this problem isn't originated in PEAR, but in pg itself.
Postgres folds everything to lowercase except one within "" (doublequotes).

So, if you - ie.: in psql:
psql=# CREATE TABLE veRYMixedCAse (NetCode integer,...);
then actually you will create a table named 'verymixedcase'.

In PHP (PEAR actually) you need to refer to this table and its columns
in lowercase.

You may run psql and execute:
\dt -- to figure out what names to be given to your tables
and then
\d NetworkTab or \d networktab -- and what names of the columns have

----- Original Message -----
From: "Gurudutt" <guru(at)indvalley(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Cc: <pgsql-php(at)postgresql(dot)org>
Sent: Monday, October 08, 2001 2:37 PM
Subject: [PHP] PEAR Problem

> Hi,
>
> It's me again. I have been able to solve most of the porting problems
> from mysql to pgsql. But I have got struck in one place. I have a
> problem where PEAR's associative array doesn't recognise the mix case
> letters.
>
> eg . I issue a query through PEAR db and get results using fetchRow of
> PEAR. Now I have set associative array feature ON.
>
> suppose the query is
>
> select NetCode,NetworkName from NetworkTab;
>
> this would return the result into a variable called $dbRow
>
> to echo the contents returned by the pgsql, I have to give
> $dbRow[NetCode] and $dbRow[NetworkName]
>
> This used to work perfectly fine with mysql, but as I moved to pgsql,
> PEAR started to return nothing
>
> like if i echo $dbRow[NetCode] it prints nothing
>
> but in the same echo is I change it echo $dbRow[netcode], it prints
> the value of the Network Code.
>
> How do I handle this situation. The application is fully written with Mix
Case
> letters for the database fields and returned result set.
>
> And one more thing "SET AUTOCOMMIT=0" which is to set auto commiting
> to "No" in mysql doesn't work in pgsql what is the equivalent command.
>
> --
> Best regards,
> Gurudutt mailto:guru(at)indvalley(dot)com
>
> Life is not fair - get used to it.
> Bill Gates
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Dan Wilson 2001-10-09 04:04:24 Re: PEAR Problem
Previous Message Gurudutt 2001-10-08 12:37:14 PEAR Problem

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2001-10-08 23:08:05 Re: SQL-Programmer tool and field%type support
Previous Message Roberto Mello 2001-10-08 18:09:34 Re: SQL-Programmer tool and field%type support