求救 thinkphp怎么会报错的呢
<?php
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();
}
}
?>