Why did thinkphp report an error for help ;? Php & nbsp; class & nbsp; EditAction & nbsp; extends & nbsp; Action {& nbsp; public & nbsp; how can I report an error when functio asks thinkphp for help?
Class EditAction extends Action {
Public function edit (){
$ Goods = M ('Goods ');
$ Id = $ _ GET ['id'];
$ Arr = $ goods-> where (id = $ id)-> find ();
Dump ($ arr );
$ This-> display ();
}
}
?> Share:
------ Solution --------------------
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();
}
}
?>
------ Solution --------------------
Reference:
Class EditAction extends Action {
Public function edit (){
$ Goods = M ('Goods ');
$ Id = $ _ GET ['id'];
$ Arr = $ goods-> where ("id = $ id")-> find ();
Dump ($ arr );
$ This-> display ();
}
}
?>
Modify it.