关于快捷插入(insert)函数
使用mysql数据库,使用下列函数时,出现错误.Fatal error: Call to undefined method CI_DB_mysql_driver::insert() in C:\www\mobile\branches\0.1\application\libraries\M0101.php on line 78
是不是mysql数据库不能使用这个函数?
$data = array(
'title' => $title,
'name' => $name,
'date' => $date
);
$this->db->insert('mytable', $data); 类库里不能直接 $this->db
请使用 get_instance() 取 CI 超级对象 我不是在类库中使用,我是直接在控制器中使用的. 那肯定是可以使用的,楼主是不是禁用了 Active Record? 是禁用了 禁用就没有这些指令了
页:
[1]