已经引入Db类和requert类,但还是报错
public function save(Request $request){
$data=input('post.');
dump($data);
$code=Db::execute("insert into user value(null,:username,:password)",$data);
if($code){
$this->success('添加成功','tp5/public/user');
}else{
$this->error('添加失败');
}
}
...全文
1908打赏收藏
thinkphp sql语句报错 参数号无效,未定义参数,代码如下,求大佬指教
已经引入Db类和requert类,但还是报错 public function save(Request $request){ $data=input('post.'); dump($data); $code=Db::execute("insert into user value(null,:username,:password)",$data); if($code){ $this->success('添加成功','tp5/public/user'); }else{ $this->error('添