------=_Part_643_8302781.1209905849141
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Sun, May 4, 2008 at 12:31 AM, Scott Marlowe <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
------=_Part_643_8302781.1209905849141
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<br><br><div class="gmail_quote">On Sun, May 4, 2008 at 12:31 AM, Scott
Marlowe <<a
href="mailto:scott.marlowe@[EMAIL PROTECTED]
">scott.marlowe@[EMAIL PROTECTED]
>>
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br></div>You have the same type of problem if you have this
query:<br>
<br>
select count(id), count(int2) from table.<br>
<br>
They both are named count. The simple answer is to always alias
your<br>
select fields.<br>
<br>
select count(id) as idcount, count(int2) as intcount from table.<br>
</blockquote><div><br>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.<br>
<br>Scott</div></div><br>
------=_Part_643_8302781.1209905849141--


|