在我的模型函数中,我有一个这样的查询:
function update_single($table,$data=array(),$id)
{
if($id!=0)
{
$this->db->trans_start()
->where('id',$id)
->update($table,$data)
->trans_complete();
return TRUE;
}
else
{
return FALSE;
}
}
我收到错误消息
Fatal error: Call to a member function where() on a non-object in /Applications/MAMP/htdocs/asset/application/models/history/history_model.php on line 1149