CodeIgniter Forums
Function get_list() for codeigniter v2 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10)
+--- Thread: Function get_list() for codeigniter v2 (/showthread.php?tid=73986)



Function get_list() for codeigniter v2 - Junie - 07-02-2019

I'm new into CodeIgniter so I have more questions about it. In my controller I have this:

public function __construct() {
       parent::__construct();
       $this->load->model('db/m_class_model', 'class');
       $this->load->model('db/m_course_model', 'course');
       $this->load->library('form_validation');
       $this->load->library("pagination");
       $this->load->library('user_agent');
       $this->load->model('db/m_item_model', 'm_item_model');
   }

public function index() {
       if ($this->error_flg)
           return;
       try {

           $pagin['total_rows'] = count($this->class->get_list());

       } catch (Exception $e) {
           $this->_show_error($e->getMessage(), $e->getTraceAsString());
       }
   }

My question is I can't find this function "get_list()" inside the model "m_class_model". Is this a built-in function of CodeIgniter? because I've search inside its documentation and I can't find that function. Enlighten me about this one. Any help will do.


RE: Function get_list() for codeigniter v2 - InsiteFX - 07-03-2019

I found this not sure if it will help.

How to get list with conditional in CodeIgniter?


RE: Function get_list() for codeigniter v2 - php_rocs - 07-03-2019

@Junie,

Also, did you do a global search in the code base if it exist? Maybe it was a custom method/function from custom library?


RE: Function get_list() for codeigniter v2 - Junie - 07-05-2019

(07-03-2019, 10:44 AM)php_rocs Wrote: @Junie,

Also, did you do a global search in the code base if it exist?  Maybe it was a custom method/function from custom library?

my first guess for this , it is a method but I cant find it in the model.


RE: Function get_list() for codeigniter v2 - Junie - 07-05-2019

(07-03-2019, 04:29 AM)InsiteFX Wrote: I found this not sure if it will help.

How to get list with conditional in CodeIgniter?

Thanks for the Info.


RE: Function get_list() for codeigniter v2 - InsiteFX - 07-05-2019

Check in your ./application/helpers directory, look in the helpers.
It may be a helper method.