Welcome Guest, Not a member yet? Register   Sign In
problem creating a model
#4

[eluser]Oblium[/eluser]
I found my problem, i didn't connect with database ._.

I solved in this way:

Code:
class Blog extends CI_Controller {

    public function index(){
        
        $data['title'] = "Titolo del Blog";
        $data['elements'] = array("elemento1","elemento2","elemento3");
        $this->load->view('blogview',$data);
    }
    
    public function insertdata($titolo,$data){
        
        //$this->load->model('Elenco_model');
        $this->load->model('Elenco_model','',TRUE);
        $this->Elenco_model->insert_element($titolo,$data);
    }
}

Thank you, however Smile


Messages In This Thread
problem creating a model - by El Forum - 04-07-2011, 05:03 AM
problem creating a model - by El Forum - 04-07-2011, 06:25 AM
problem creating a model - by El Forum - 04-07-2011, 07:38 AM
problem creating a model - by El Forum - 04-07-2011, 07:43 AM
problem creating a model - by El Forum - 04-07-2011, 08:01 AM
problem creating a model - by El Forum - 04-07-2011, 10:59 AM
problem creating a model - by El Forum - 04-07-2011, 02:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB