0

这是我的查询:

 $aThreads = $this->database()->select('mf.parent_id,mf.forum_id,ff.user_id as favourite_id,ff.is_favourite,mf.name,ft.*,'.Phpfox::getUserField('u2','last_').'') 
                              ->from($this->_sTable, 'ft')
                              ->Join(Phpfox::getT('forum'), 'mf', 'mf.forum_id = ft.forum_id')
                              ->leftJoin(Phpfox::getT('user'),'u2', 'u2.user_id = ft.user_id')
                              ->leftJoin(Phpfox::getT('forum_favourite'), 'ff', 'u2.user_id = ff.user_id AND ft.thread_id = ff.thread_id')
                              ->where($mConditions)
                              ->execute('getSlaveRows'); 

我必须从forum_favourite表中选择两列值。

forum_favourite表中的列(thread_id,user_id,is_favourite)。由此,我需要选择user_id and is_favourite.

我怎样才能做到这一点?

4

0 回答 0