Wednesday, August 29, 2012

Re: findById

try this

http://arafats.info/cakephp-findbyfieldname-data-read/

On Wed, Aug 29, 2012 at 4:08 PM, Nareh Tarasyan <narehtarasyan@gmail.com> wrote
:
Hey, ppl. help me.
I try this code:

 IndexsController.php
$this->set('x', $this->Word->findByid(10));

then 
view/Indexs/index.ctp
echo "word= ".$x;

It echoes 

word=Array;


What is the problem??? When I have loaded Word model in my IndexsController, and I have a record with id=10 in db table. :/

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 



--
Thanks & Regards.
-----------------------------------------------------------------------------------------------------------------------------
Yasir Arafat (Hasib)
Deputy Project Manager, Software Solutions
Grameen Solutions
Contact Information:
Cell : +8801816 536 901, +880197 333 2 888
Web: http://arafats.info

--
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
 
 

No comments: