Welcome Guest, Not a member yet? Register   Sign In
Call to undefined method my_model:dame_articulos()
#4

[eluser]TWP Marketing[/eluser]
@InsiteFX The model name needs to be Capitalized in almost all usage. It's the file name that is lowercase.

@lucasvm. Your controller function looks ok. As Insitefx said, check the filename itself, it should be lower case.

Code:
...
function muestra($id){
       $this->load->model('Articulos_model'); // <-- this is correct

       //pido al modelo el artículo que se desea ver
       $arrayArticulos = $this->Articulos_model->dame_articulos($id); // <-- this is correct
       $numero_posts = $this->Articulos_model->dame_nro_posts(); // <-- this is correct
       $datos_articulos = array('articulos' => $arrayArticulos,
                                'numero_de_posts' => $numero_posts);
       if (!$arrayArticulos){
                    show_404();
                }else
                    {
        $this->load->helper('url');
        $this->load->view('header');
        $this->load->view('articulos', $datos_articulos);
        $this->load->view('footer');
        }
   }
...


Messages In This Thread
Call to undefined method my_model:dame_articulos() - by El Forum - 05-01-2011, 03:49 PM
Call to undefined method my_model:dame_articulos() - by El Forum - 05-01-2011, 04:58 PM
Call to undefined method my_model:dame_articulos() - by El Forum - 05-01-2011, 05:28 PM
Call to undefined method my_model:dame_articulos() - by El Forum - 05-01-2011, 05:36 PM
Call to undefined method my_model:dame_articulos() - by El Forum - 05-01-2011, 05:58 PM
Call to undefined method my_model:dame_articulos() - by El Forum - 05-01-2011, 09:39 PM
Call to undefined method my_model:dame_articulos() - by El Forum - 05-02-2011, 10:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB