error en StandardForm al utilizar un model

edited septiembre 2007 in Principiantes
Hola, tengo este codigo en el __contruct de una clase que extiende de StandardForm:

$this->datos_tienda = $this->Tiendas->find_by_ip($this->ip);

existe el model tiendas.php ...

Este es el error:
Fatal error: Call to a member function find_by_ip() on a non-object

Por qué no funciona?

Saludos.

Comentarios

  • al parecer Kumbia no encuentra un campo llamado IP en el modelo tiendas

    Saludos
  • edited 8:20
    esta es la tabla:

    CREATE TABLE `tiendas` (
    `id` int(11) NOT NULL auto_increment,
    `nombre` varchar(50) NOT NULL,
    `ip` varchar(15) NOT NULL,
    PRIMARY KEY (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;


    el campo ip existe...

    lo arregle asi:

    $Tiendas = new Tiendas();
    $this->registro = $Tiendas->find_by_ip($this->ip);



    Saludos
Sign In or Register to comment.