CodeIgniter Forums
this code give me error 500 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: this code give me error 500 (/showthread.php?tid=81448)



this code give me error 500 - salimmous1 - 03-03-2022

please, guys, this code give me error 500 but when i remove this -> result_array() its worked but I don't know when problem

function getCodeForCity($destination
        {
          $result = $this->db->query("SELECT code FROM hotels WHERE MATCH (city_slug) AGAINST ('$destination' IN BOOLEAN MODE)")->result_array();
          return $result;
        }


RE: this code give me error 500 - aemoustsource - 03-09-2022

please, folks, this code give me blunder 500 however when I eliminate this - > result_array() its worked yet I don't have any idea when issue

work getCodeForCity($destination


RE: this code give me error 500 - kenjis - 03-10-2022

Check the value of `$this->db->query("SELECT code FROM hotels WHERE MATCH (city_slug) AGAINST ('$destination' IN BOOLEAN MODE)")`.