How to run Query in Codeigniter Helper

If you want to run query in codeigniter helper.. You can just follow this instruction

$CI =& get_instance();
$CI->load->database();
$CI->load->model('settings_model');
$appsettings= $CI->settings_model->getSettings();

In settings_helper, use your model name. I think this the best solution to run query in codeigniter helper..

Leave a Reply

Your email address will not be published. Required fields are marked *