Home >Backend Development >PHP Tutorial >求救 thinkphp怎么会报错的呢

求救 thinkphp怎么会报错的呢

WBOY
WBOYOriginal
2016-06-23 14:26:47875browse

  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(); }}?>

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

Statement:
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