RE: [PEAR-DEV] PEAR::DB and oracle question

From: Date: Mon, 08 Dec 2003 19:19:40 +0000
Subject: RE: [PEAR-DEV] PEAR::DB and oracle question
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24296@lists.php.net to get a copy of this message
> From: Daniel Convissor [mailto:danielc@analysisandsolutions.com] > Sent: Monday, December 08, 2003 8:18 PM > On Mon, Dec 08, 2003 at 04:29:05PM +0100, Juan Manuel Caicedo wrote: > > > > The cause of the bug is that Oracle 'always' returns the keys of an > > associative array in upper case, so we will have to make something with > > the result of the query. In PHP 4.2 the function array_change_key_case > > was introduced and that's exactly the solution that PEAR uses. > > > > In the class DB_oci8 the function is called in the method fetchInto > > (DB/oci.php [version 1.10] lines 194 - 211 ). But notice that the > > function will be called only if the attribute $this->options['optimize'] > > has the value 'portability'. > > I notice DB only has the case conversion ability for some database types. > Considering the goal is "portability," all database types should have this > functionality. This would allow people to develop an application that > will run on any supported DBMS without having to code the > array_change_key_case() in themselves. > > Thoughts? No, for PEAR::[M]DB you should always use lower case column names. The conversion therefore only needs to be done for databases that upper case the columns in result sets. Regards, Lukas

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