thinkphp3.2 多表查询 联表查询

  • 内容
  • 相关
$goodsList = M('shop_goods g')
            ->join("cmf_shop_category c on c.id=g.cid")
            ->field("g.id,g.cid,c.name cname,g.name,g.price,g.stock,g.photo,g.limit_price,g.radio,g.status")
            ->where("cid = {$id} and g.status=1 and g.radio=0")
            ->select();

本文标签:

版权声明:若无特殊注明,本文皆为《Leek》原创,转载请保留文章出处。

本文链接:thinkphp3.2 多表查询 联表查询 - https://pjax.cc/19.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注

未显示?请点击刷新

允许邮件通知