Welcome Guest, Not a member yet? Register   Sign In
Something wrong in my model
#2

I answer myself I've found the way here is my corrected model function find() :  
PHP Code:
public function find($value) {

 
       $this->load->database();
 
       $q $this->db->get_where("stages", array("id_stages" => $value), 1);
 
       $r $q->result(get_class($this))[0];
 
       $r->set_sessions(); // a private method to complete this object

 
       return $r;
 
   


Now it works perfectly !  Big Grin

I hope this could help

see you next time, I really enjoy CI my next project will use CI 3
Reply


Messages In This Thread
Something wrong in my model - by brian85 - 03-03-2016, 01:40 PM
[SOLVED]RE: Something wrong in my model - by brian85 - 03-03-2016, 02:43 PM
RE: Something wrong in my model - by brian85 - 03-04-2016, 01:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB