I'm trying to insert a number into the database from within a library using,
$data = array(
'id' => $id,
'so' => '1',
'username' => $username
);
$this->db->insert('db', $data);
but whenever I run it, I get "Fatal error: Call to a member function insert() on a non-object in"
Anyone know why?
Thanks
$this->db. it appears its not what you think it is, and it doesnt have a member function calledinsert, and is not even an object at all