How to do a join with ttwo tables ??

Posted by bahamut100 on Stack Overflow See other posts from Stack Overflow or by bahamut100
Published on 2010-06-03T07:06:15Z Indexed on 2010/06/03 7:14 UTC
Read the original article Hit count: 209

Filed under:
|
|

HI,

I try to translate this query :

SELECT *
FROM `reunion` , lieu
WHERE reunion.lieu_reunion = lieu.id_lieu

to propel query :

$c=new Criteria();
$c->addJoin(ReunionPeer::LIEU_REUNION,LieuPeer::ID_LIEU, Criteria::LEFT_JOIN);
$this->reunions = ReunionPeer::doSelect($c);

But in my template, when I made a print_r($reunions), the field "ville" (from the table 'lieu') is not present.

Why ??

© Stack Overflow or respective owner

Related posts about symfony

Related posts about criteria