求救 thinkphp怎么会报错的呢

WBOY
Release: 2016-06-23 14:26:47
Original
852 people have browsed it

  class EditAction extends Action{
    public function edit(){
$goods=M('Goods');
        $id=$_GET['id'];
    $arr=$goods->where(id=$id)->find();
dump($arr);
  $this->display();
 }
}
?>


回复讨论(解决方案)

<?php  class EditAction extends Action{    public function edit(){$goods=M('Goods');$id=$_GET['id'];$condition['id'] = $id;$arr=$goods->where($condition)->find();var_dump($arr);$this->display(); }}?>
Copy after login

  class EditAction extends Action{
    public function edit(){
$goods=M('Goods');
        $id=$_GET['id'];
    $arr=$goods->where("id=$id")->find();
dump($arr);
  $this->display();
 }
}
?> 修改一下。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template