I'm wondering why Cake is returning each row as two separate arrays
instead of just adding the total to the [cities] array. I'm thinking of
just post-processing this to put the total into the cities array, but
I'm wondering if I need to re-state the query a different way?
When there is more
Anselm,
Thanks that makes sense to me. It's actually not much more work to work
with the data in this format. It's just good to know this is by design
and not my limited knowledge of Cake at work. :)
Thanks,
Zoltan
--~--~-~--~~~---~--~~
You received this
Hi,
I'm running a custom query that adds up the total number of
establishments (bars, stores, etc.) in a city and then order then my by
this total:
$aTopCitiesList = $this-query('SELECT `cities`.`id`, `cities`.`name`,
count( `establishments`.`name` ) AS `total`
FROM `cities`