亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    教你如何把SQL語句轉(zhuǎn)成TP5

    下面thinkphp框架教程欄目將給大家簡單介紹下如何把SQL語句轉(zhuǎn)成TP5,希望對(duì)需要的朋友有所幫助!

    教你如何把SQL語句轉(zhuǎn)成TP5

    教你如何把SQL語句轉(zhuǎn)成TP5?

    具體問題描述:

    求大神幫我把這段原生SQL語句轉(zhuǎn)成TP5的謝謝!就是Db::('name')->這種鏈?zhǔn)讲僮鞯?/p>

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

    實(shí)現(xiàn)方法:

    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/manual/thinkphp5/135180

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)