Oracle row limit support

From: Date: Wed, 28 Nov 2001 03:00:58 +0000
Subject: Oracle row limit support
References: 1 2 3 4 5 6 7 8  Groups: php.db php.pear.dev 
Request: Send a blank email to php-db+get-14636@lists.php.net to get a copy of this message
Manuel Lemos wrote: > > > > > > > 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; > > That would work, but you require people to change their queries. I guess > that does not work as general practice because. > > > Also if Oracle name a sum(foo) column as "sum" will be trivial to add > > it. I ran a query without the column alias and seems that Oracle names that column with the entire name for ex: "sum(foo)". If that is true the support could be completed. I'll try it when get some free time or if some kind guy could send the output of this: $db = DB::connect("oci8://..."); print_r($db->getRow("select count(somefield) from table", DB_FETCHMODE_ASSOC)); here, would be so great :-) Tomas V.V.Cox

« previous php.db (#14636) next »