Hi Bakers,

I've always been a little confused about what factors in a query
determine if the output array comes out nice, i.e with Model names as
keys, or ugly, as in with numeric keys only.

For example:

$res=$this->WorkItem->findAll
                        (
                                 $where=$dateClause,
                                 $fields="quantity" // referencing the field 
makes nice output
                                 //$fields="(SUM(Quantity)) as quantity" makes 
bad output
                         );

Here, the use of SUM seems to stop CakePHP from formatting the output
as one would like it. I personally don't see why CakePHP can't manage
this scenario!

Is there anyway to refactor the above query to get a nice output
format?

Can anyone summarise (or show me where the documentation exists)  what
factors affect Cake's ability to output query results the nice way?

Thanks in advance....

Woody


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to