在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/PHP  數(shù)據(jù)庫/ 求幫我把這段原生SQL語句轉(zhuǎn)成TP5的謝謝!

求幫我把這段原生SQL語句轉(zhuǎn)成TP5的謝謝!

求大神幫我把這段原生SQL語句轉(zhuǎn)成TP5的謝謝!就是Db::('name')->這種鏈?zhǔn)讲僮鞯?br>'select a.id, a.title,a.create_time,a.is_solve,count(b.qid) as answer_count from fa_question a,fa_answer b where a.id=b.qid and a.is_solve=0 group by b.qid order by answer_count DESC LIMIT 6';

回答
編輯回答
懶豬
Db::table(['fa_question '=>'a','think_role'=>'b'])
    ->field('a.id, a.title, a.create_time, a.is_solve, count(b.qid) as answer_count)
    ->where(' a.id=b.qid and a.is_solve=0')
    ->group('b.qid')
    ->order('answer_count desc')
    ->limit(6)
    ->select()

附上手冊(cè),多看看手冊(cè)https://www.kancloud.cn/manua...

2018年1月19日 10:44