Re: PEAR::DB and oracle question

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: PEAR::DB and oracle question
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24314@lists.php.net to get a copy of this message
Just a note: If you do the query like this: select foo as bar it is normal for the server to return BAR. I know for a fact that postgresql does it. If you want to specify the case, you have to use quotes: select foo as "bar" I don't have an Oracle server nearby, so I can't test it on Oracle, but I know for a fact this is pgsql's behaviour. -- Sérgio Carvalho Justin Patrin wrote:
Arnaud Limbourg wrote:
Hello all, A bug concerning liveuser http://pear.php.net/bugs/bug.php?id=355 brings to ask a question to any PEAR::DB oracle user out there. Apparently when a query is made against an oracle database oracle send backs the fields name upper cased. Even though an alias is passed in the query like SELECT myField AS myfield the 'myfield' is returned as 'MYFIELD'. Since i don't have access to an oracle database, can anybody confirm this and does anybody know how to overcome this ? Arnaud.
All oracle queries return the columns as upper case, this is in any language, it's part of the Oracle server. You should always expect the field names to be in upper case, unfortunately. I recommend writing your queries with upper case tables/fields because that's how it comes back.


« previous php.pear.dev (#24314) next »