$last24bytes = Doctrine_Query::create()->
         from('Job j')->
         addSelect('sum(j.JobBytes) as bytes')->
         where('j.Endtime <= now()');

On Thu, May 28, 2009 at 7:00 AM, Reynier Perez Mira <rper...@uci.cu> wrote:

>
> Hi every:
> I started to use Doctrine today and it's amazing but I have some problems.
> Can any help me to build this query:
>
> > select sum(JobBytes),count(*) from Job where Endtime <= NOW() and
> UNIX_TIMESTAMP(EndTime) > UNIX_TIMESTAMP(NOW())-86400
>
> I try this:
>
> $last24bytes = Doctrine_Query::create()->
>          from('Job j')->
>          select('sum(j.JobBytes)')->
>          where('j.Endtime <= now()');
>
> But this doesn't work. Can any help me?
> Cheers and thx in advance
> Ing. Reynier Pérez Mira
> Dirección Técnica IP
>
>
>
> >
>


-- 
Thomas Rabaix
http://rabaix.net

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to