Hi every:
I'm newbie using Doctrine and also DQL I only know basic SQL and a bit 
of Propel. I need to create a complex query with REST operation and also 
with some Joins. I read the Doctrine documentation but I can't build the 
query as the doc suggest. I do this:

$last1day = date('Y-m-d H:i:s', time() - 86400);
     $q = Doctrine_Query::create()
         ->from('Job j')
         ->leftJoin('s.jobstatus s')
         ->where("j.endtime > ?", $last1day)
         ->where("j.jobstatus IN ('T', 'E', 'e', 'f', 'A')")
         ->orderBy('j.starttime, j.jobid');

But when I try to execute the query I get this error:

500 | Internal Server Error | Doctrine_Table_Exception
Unknown relation alias jobstatus

Can any help me? Also how I can use this: 'DurationTime' => '(EndTime - 
StartTime)' inside the same query as a new calculated value?

PS: I know this question not belong to here but I suscribe to 
doctrine-users list and didn't receive confirmation.

Regards

--~--~---------~--~----~------------~-------~--~----~
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