[eluser]GaryTheLlama[/eluser]
This error seems to happen at least once a day to each of my users.
Quote:Fatal error: Call to a member function result() on a non-object in M:\web\users\test\html\qual\SATCMS\_CodeIgniter\application\models\products_model.php on line 537
The line it's pointing to is pretty much always the "return $query->result();" line.
Code:
function GetNotes($parentId)
{
$this->db->select("Note, DateCreated, EnteredBy");
$this->db->where("ParentID", $parentId);
$query = $this->db->get("tblNotes");
return $query->result();
}
If they just resubmit the form, it works fine and will work 99% of the time. I'll be enabling the profile on a few users to see if I can collect some more information, but it seems like the database code is just having a hiccup.
Has anyone seen this? Any ideas or thoughts on how to prevent this or catch it and just re-try the code?