0
Hello. After hours trying to solve this problem and researches I did about the problem, I came to ask you how I can remedy this question
The mistake 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 line referring to the error to see if this error occurred in some other location and in 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 couldn’t post all the code because it’s almost 4,000 lines.
In addition to help to fix, I would like to understand why this error occurs as it happened only after I changed the hosting site.
Thank you very much!