On Sun, May 4, 2008 at 12:31 AM, Scott Marlowe <[EMAIL PROTECTED]>
wrote:

>
> You have the same type of problem if you have this query:
>
> select count(id), count(int2) from table.
>
> They both are named count.  The simple answer is to always alias your
> select fields.
>
> select count(id) as idcount, count(int2) as intcount from table.
>

Of course.  This is the a limitation stemming from the CakePHP web
development framework.  In this case, it would assign those two fields to an
unnamed table/bucket, but for columns stemming from the from clause, it
splits them into buckets based on the table alias name.  I can alias the
table names, but it means rewriting all the custom queries in the app, or
the resulting processing code which has been relying on the bucketizing.
Which is what I will do.  Just another small speedbump moving my app away
from MySQL.

Scott

Reply via email to