Re: Common DB Abstraction Layer:

From: Date: Wed, 21 Nov 2001 16:46:06 +0000
Subject: Re: Common DB Abstraction Layer:
References: 1 2 3 4 5 6  Groups: php.db php.pear.dev 
Request: Send a blank email to pear-dev+get-3022@lists.php.net to get a copy of this message
Manuel Lemos wrote: > > Hello, > > John Lim wrote: > > Each designer has a different point of view, like Tomas has > > written a really excellent oci8 "select limit" emulation, but looking > > at the code, it's so complicated that i decided not to incorporate it > > in ADODB because I value simplicity. I know Tomas' code works > > in theory, and its really impressive that you even considered UNIONs, > > Tomas, but I just like "simple" code that I can keep in my head. > > But it does not work with computed columns like those that apply > functions (COUNT, SUM, SUBSTRING, etc...). The code assumes that you are > actually selecting only real table fields. I think it also does not work > with columns with table name prefixes. That's partially true. But it's a common practise to use column aliases in conyunction with functions (and a must for assoc fetchs) and this is supported by the code I wrote, for ex: select count(field) as count from foo; Also if Oracle name a sum(foo) column as "sum" will be trivial to add it. Any way I said it later, a real SQL parser will be the solution. Stig came with the idea time ago and nowadays it will help a lot in many other cases. Tomas V.V.Cox

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