I am currently trying to display a user count on my website that only counts users with a certain role ID in my user database. So far I have tried several variations, but in continuously outputs the master count as opposed to the specific role count.
$this->set('fillme',$fillme);
$coptions = array('conditions' => array('User.role_id' => 3));
$students= $this->User->find('count');
$this->set('students',$students);
I'm not sure exactly what I'm doing wrong, I'll admit that I'm fairly new to Cakephp and all, but I've tried a few variations such as replacing '=>' with '==' or segregating ''User.role_id'' into ''User','role_id'' but none of it seems to work. Any and all help/suggestions would be greatly appreciated.