two things:
- there is a 'count' function builtin cake:
$count = $this->Email->findCount('');
- i'm not sure what you are trying to achieve with this query, but
you surely could do it the cake way:
- $magasins = $this->Email->findAll('', 'magasin');
hope it helps :)
spakr
On 9/12/06, Jeremie <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have got the same problem ...
> Can anyone help us ?
>
> $request = "SELECT magasin, count(email) as total
> FROM emails
> GROUP BY magasin ORDER by total DESC;";
>
> $classementGeneral = $this->Email->Execute ($request );
>
>
>
> And in my view (print_r) :
>
> Array
> (
> [0] => Array
> (
> [Email] => Array
> (
> [magasin] => AMX
> )
>
> [#sql_4cc_0] => Array
> (
> [total] => 271
> )
> )
> )
>
>
>
> Thanks
> Jérémie
>
>
> >
>
--
[web] http://synapsisdi.com.br
[livesets] http://djspark.com.br
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---