Hello guys,(sorry for my english) I’m on a problem for 2 days now and i need your help.
I have two tables in my phpmyadmin in the same database => listeners / viewers
I have two Models in my app/Model/Datasource => Listener.php / Viewer.php
The loadModel() of Listener works :
$this->loadModel(‘Listener’);
$test1 = $this->Listener->find(‘all’);
But the loadModel() of the Viewer make a error
$this->loadModel(‘Viewer’);
$test2 = $this->Viewer->find(‘all’);
I’m still don’t understand why.
Did i forgot something with my Viewer Model ?
This is my Listener Model
<?php class Listener extends AppModel{ public $name = 'Listener'; //public $hasMany = 'AchieveConnectionModel'; public $validate = array( 'ip_addrress' => array( 'rule' => 'notEmpty' ), 'user_agent' => array( 'rule' => 'notEmpty' ), 'latitude' => array( 'rule' => 'notEmpty' ), 'longitute' => array( 'rule' => 'notEmpty' ), 'lastlogin' => array( 'rule' => 'notEmpty' ) ); }
And this is my Viewer Model :
<?php class Viewer extends AppModel{ public $name = 'Viewer'; public $validate = array( 'vf' => array( 'rule' => 'notEmpty' ), 'total' => array( 'rule' => 'notEmpty' ), 'nonvf' => array( 'rule' => 'notEmpty' ), 'pourcentvf' => array( 'rule' => 'notEmpty' ) ); }
Thank you