you are very nice!
Rimoe
2010/5/27 John Andersen <j.andersen.lv@gmail.com>
As specified in the CakePHP book at:
http://book.cakephp.org/view/73/Retrieving-Your-Data#findBy-451
the findBy<fieldname> does not take a second parameter.
So in order to set the recursive to 0, do this before your
findBy<fieldname> call.
[code]
$this->YourModelName->recursive = 0;
$data = $this->YourModelName->findByusername('aaaa');
[/code]
Enjoy,
John
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
On May 27, 11:37 am, Rimoe <meiyo...@gmail.com> wrote:
> hi,
>
> I have use the findby function, but the recursive param have no role.
> my cakephp version is 1.2.1.8004
>
> for example
> I have use the model function
> findbyusername('aaaa', array('recursive' => 0));
>
> but it has show like findbyusername('aaaa', array('recursive' => 1));
>
> do I have wrong use the function
>
> I want to show the result just like
> find('first',array('conditions' => array('username'=>'aaaa'),'recursive' =>
> 0));
>
> is it a bug?
>
> thank you
>
> Rimoe
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 tocake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
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 For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment