zoukankan      html  css  js  c++  java
  • yii2:多表查询

    啥都不说了,上代码:

    $list = static::find()
                        ->leftJoin('book',
                            'book.RID = prices.RID')->select('prices.*,book.WCONTENT,book.WIMGURL,book.WURL')
                        ->andFilterWhere(['prices.WMODEL'=> $where_condition['WMODEL']])
                        ->andFilterWhere(['prices.WTYPE'=> $where_condition['WTYPE']])
                        ->offset($params['offset'])
                        ->orderBy(['prices.WCREATETIME' => SORT_DESC])->limit($params['limit'])->asArray()->all();
    

      

  • 相关阅读:
    2014-04-23 总结
    14-5-13
    PHP
    14-5-8
    ajax
    14-5-6
    14-5-5
    PHP初解
    14-4-30
    14-4-29
  • 原文地址:https://www.cnblogs.com/achengmu/p/6729194.html
Copyright © 2011-2022 走看看