如何解决这种在当前页传递参数给当前方法用

浏览:2934 发布日期:2015/03/16 分类:求助交流
  $pid = I("get.pid");
        //实例化image表
        $image = M('Image');
        $arr = $image->field("id,pid,name")->where("pid=0")->select();
如果where()条件中的pid0改成上面I()的那个$pid 页面就会报错
SQLSTATE[42000]: Syntax error or access violation: 1064 Erreur de syntaxe près de ')' à la ligne 1
求这种的做法,当前页,传递参数给当前方法使用。
最佳答案
评论( 相关
后面还有条评论,点击查看>>