Welcome Guest, Not a member yet? Register   Sign In
Loading Model

I got a view and I'm trying to retrieve some data from a model, executing the following lines:

$data = $this->clientes_model->getCliente(1);

But I'm getting the follow message.

Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: CI_Loader::$vendedores_model

Filename: views/template.php

Line Number: 3

If I load another model, works fine:

$data = $this->pedidos_model->getPedido(1);

Actually this is the only model that is loaded normally, any other I try, I get the message.

Here's my model (example):

Quote:class Clientes_model extends CI_Model{

function getClient($id){

return 'exampleClient'.$id


Quote:class Pedidos_model extends CI_Model{

function getPedido($id){

return 'examplePedido'.$id


Somebody can help me with this?
Both models are declared exactly alike.

Messages In This Thread
Loading Model - by El Forum - 02-08-2013, 10:20 AM
Loading Model - by El Forum - 02-08-2013, 01:22 PM

Theme © iAndrew 2016 - Forum software by © MyBB