Re: Oracle row limit support
| From: | Manuel Lemos | Date: | Thu, 29 Nov 2001 03:30:03 +0000 |
| Subject: | Re: Oracle row limit support | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.db php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3177@lists.php.net to get a copy of this message | ||
Hello,
"Tomas V.V.Cox" wrote:
>
> 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 don't think it will ever work. When you do not use column alias, you
will be asking Oracle to to apply a function to a column that does not
exist in the inner query.
If you think it works, just show me the result query that you end up
executing.
Regards,
Manuel Lemos