[symfony-users] Re: SOT: Help with Doctrine query

2009-06-25 Thread Bertrand Zuchuat
Hello, You use foreach function and getter to show your records. You have an example on this link: http://www.symfony-project.org/jobeet/1_2/Doctrine/en/06 Bertrand Le 25 juin 09 à 17:24, Reynier Pérez Mira a écrit : > Thanks again Bertrand. I build the relations and now it works fine. I > ju

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-25 Thread Reynier Pérez Mira
Bertrand Zuchuat wrote: > Hello, > > Check your model name. > > Relation is ->leftJoin('aliasRoot.ModelName aliasModelName) > > Best regards > Thanks again Bertrand. I build the relations and now it works fine. I just have a last question: How I can show the results in templates? Any tutori

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-21 Thread Bertrand Zuchuat
Hello, Check your model name. Relation is ->leftJoin('aliasRoot.ModelName aliasModelName) Best regards Bertrand Le 20 juin 09 à 20:16, Reynier Pérez Mira a écrit : > Nothing, I get this error insted: > > 500 | Internal Server Error | Doctrine_Table_Exception > Unknown relation alias Status

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-20 Thread Reynier Pérez Mira
Bertrand Zuchuat wrote: > Hello, > > Check with this: > > $q = Doctrine_Query::create() > ->select('j.*, (j.endtime - j.starttime) as duration, s.jobstatuslong, > c.name, p.name, f.*') > ->from('Job j') > ->leftJoin('j.Status s') > ->leftJoin('j.Client c') > ->leftJoin('j.Pool p') > ->leftJoin

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-20 Thread Bertrand Zuchuat
Hello, Check with this: $q = Doctrine_Query::create() ->select('j.*, (j.endtime - j.starttime) as duration, s.jobstatuslong, c.name, p.name, f.*') ->from('Job j') ->leftJoin('j.Status s') ->leftJoin('j.Client c') ->leftJoin('j.Pool p') ->leftJoin('j.Fileset f') ->where("j.endtime > ?", $last1d

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-20 Thread Reynier Pérez Mira
Bertrand Zuchuat wrote: > Use addWhere on your query for second and next. Thanks for your reply Bertrand. I change the query as you suggested and see the result: $q = Doctrine_Query::create() ->select('j.*, (j.endtime - j.starttime) as duration, s.jobstatuslong, c.name, p.name, f.*')

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-20 Thread Bertrand Zuchuat
Hello, Use addWhere on your query for second and next. Le 20 juin 09 à 03:49, Reynier Pérez Mira a écrit : > $q = Doctrine_Query::create() > ->select('j.*, (j.endtime - j.starttime) as duration, > s.jobstatuslong, c.name, p.name, f.*') > ->from('Job j, Status s, Client c, Pool p

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-19 Thread Reynier Pérez Mira
Reynier Pérez Mira wrote: > Reynier Pérez Mira wrote: >> 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 >>

[symfony-users] Re: SOT: Help with Doctrine query

2009-06-19 Thread Reynier Pérez Mira
Reynier Pérez Mira wrote: > 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 t