Help with a models and controller...


I am trying to learn how to use codeigniter and what I really need at this moment is to pass a uri segment from the controller to the model.

What I am needing is to grab a segment of the URI inside the controller, pass that segment name as a variable to the model so I can run a query based on what that variable contains.

Thanks for any help,


$value = $this->uri->segment(2);
$returnValue = $this->Mymodel->someFunction($value);

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.