欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長(zhǎng)資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

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

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

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

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

          具體問(wèn)題描述:

          求大神幫我把這段原生SQL語(yǔ)句轉(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)