Welcome Guest, Not a member yet? Register   Sign In
Model Not Loaded?
#1

[eluser]Vik[/eluser]
I've just started working with CI, I have a newbie question.

I have a controller that contains this code:
Code:
<?php
class Alloy_Planner extends Controller {

    function Alloy_Planner()
    {
        echo ('a');
        parent::controller();
        echo ('b');
        $this->load->model('add_alloys_model');
        echo ('c');
    }
    
    function index()
    {
        $data['title']= 'Alloy Planner';
        $this->load->view('alloy_planner_views/add_alloys_view', $data);
            
    
    }
    
    function search()
    {
        $data['title']= 'Alloy Planner';
        $alloy_name = $this->input->post('alloy_name');
        
        $data['search_results'] = $this->add_alloys_model->getSearchResults($alloy_name);
        
        $this->load->view('alloy_planner_views/search', $data);
            
    
    }
}
?>

I have a file called "add_alloys_model.php" (well, it's actually not alloys, it's something else, but I'm not ready to announce it yet) in the models folder. But, it looks like it's not being loaded. The echo statements in the code print out 'a' and 'b', and then everything stops. The rendered html page is completely blank.

What should I check in order to fix this?


Messages In This Thread
Model Not Loaded? - by El Forum - 08-08-2007, 07:36 PM
Model Not Loaded? - by El Forum - 08-08-2007, 09:29 PM
Model Not Loaded? - by El Forum - 08-08-2007, 11:40 PM
Model Not Loaded? - by El Forum - 08-09-2007, 12:51 AM
Model Not Loaded? - by El Forum - 08-09-2007, 10:33 AM
Model Not Loaded? - by El Forum - 08-09-2007, 10:34 AM
Model Not Loaded? - by El Forum - 08-28-2007, 06:31 PM
Model Not Loaded? - by El Forum - 08-28-2007, 07:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB