where语法问题

浏览:357 发布日期:2018/05/30 分类:求助交流 关键字: thinkphp3.2.3
$goodsModel = D('Admin/goods');
$cat_id = I('cat_id');
        $goodsList = $goodsModel->field('goods_id,goods_name,shop_price,goods_img,market_price')->where('cat_id='.$cat_id)->limit($Page->firstRow.','.$Page->listRows)->select();
        $this->assign('goodslist',$goodsList);
        $this->display();
1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 [ SQL语句 ] : SELECT `goods_id`,`goods_name`,`shop_price`,`goods_img`,`market_price` FROM `goods` WHERE ( cat_id= )

跟着视频写的,还是报错求解
最佳答案
评论( 相关
后面还有条评论,点击查看>>