I have the following code that has been working perfectly for a few months, and all of a sudden it has stopped working. I checked the query being run and it is working correctly and getting the intended results.
This is the code:
$this->db->where('user', $user);
$this->db->select_max('id', 'max_id');
$query1 = $this->db->get('offers');
$result = $query1->row();
This is the error:
Fatal error: Call to a member function row() on a non-object