When you write $this->Model->find('list'), it gives you an array in return. If you want only 1 field value , then you should use $this->Model->field('filename',array('conition goes here'));
In your case it should be $var = $this->Login->field('Category',('Login.username'=>$dbuser['Login']['username']));
make sure to check the case of the field name i.e its Category or category in you database.
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Wednesday, June 27, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment