public function insert_success()
{
$a=$this->input->post('n1');
$b=$this->input->post('n2');
$c=$this->input->post('n3');
echo $a.$b.$c;
$sql="insert into register (name,password,email)
values('$a', '$b' , '$c' )";
$qr=$this->db->simple_query($sql);
return true;
}
我在 CI 3.0.6 版本中执行此操作,并且在第 15 行显示错误:
在第 15 行调用 C:''Xamp''htdocs''MVC1''application''models''abc.php 中 null 上的成员函数 simple_query
(
请帮帮我...
听起来您的数据库$this->db
设置不正确。
为了正确设置它,请查看此CI用户指南,了解如何正确连接到数据库。