0

This is my query:

 $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'); 

I have to select two column values from forum_favourite table.

Columns in forum_favourite table (thread_id,user_id,is_favourite). From this, I need to select user_id and is_favourite.

How can I do this?

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
mani
  • 3
  • 1
  • 4
  • Im not sure what exactly are you trying to do but if you just want to select more fields you can add them to the select part, for example: ->select('table.field, mf.parent.... – Purefan Mar 13 '13 at 12:58
  • 1
    Please use proper stackoverflow syntax to asks questions. Your question is badly formulated and it seems you haven't made some effort to research it. – keshu_vats Mar 18 '13 at 06:39

0 Answers0