Hello. After hours trying to solve this problem and research I did about the problem, I came to ask you how I can remedy this issue.
The error is:
Fatal error: Call to a member function result () on a non-object in /home/iaulas/public_html/system/application/models/site_model.php on line 483
I removed the error line to see if this error occurred somewhere else and on another line the same error occurs.
This is the function: (I use the codeigniter framework)
function cat_busca() {
$query = 'SELECT materiais_cat_id as id, MCCat as cat, MCOrdem as ordem FROM ((SELECT * FROM materiais_cat where materiais_cat.MCMostrar = "Sim" GROUP BY MCCat) UNION (SELECT * FROM livros_cat WHERE livros_cat.LCMostrar = "Sim" GROUP BY LCCat) UNION (SELECT * FROM cursos_cat WHERE cursos_cat.CCMostrar = "Sim" GROUP BY CCCat)) AS tabela ORDER BY ordem';
$retorno = $this->db->query($query);
return $retorno->result();
}
I could not post the whole code because there are almost 4 thousand lines.
In addition to help to fix, I would like to understand why this error occurred because it happened only after I changed the hosting site.
Thank you!