Zend Framework Db Select Join table help

后端 未结 4 1096
醉话见心
醉话见心 2021-01-05 20:22

I have this query:


SELECT g.title, g.asin, g.platform_id, r.rank
        FROM games g
        INNER JOIN ranks r ON ( g.id = r.game_id )
        ORDER BY r.         


        
4条回答
  •  梦谈多话
    2021-01-05 21:02

    Other example:

    select n.content, n.date, u.mail 
    from notes n, users u
    where n.id_us=u.id and reminder=current_date
    
    $query = $this->select()
        ->from(array('n'=>'notes'), 
          array('content', 'date'))
        ->join(array('u'=>'users'), 'n.id_us=u.id and n.reminder=current_date',
          array('mail'))
        ->setIntegrityCheck(false);
    return $this->fetchAll($query);

    That's work fine :)

提交回复
热议问题