In this example error. Right will like this.

if (isset($this->params['requesed']))
    return $docTypes;

But that does not play a role.

On 17 нояб, 10:31, Pizgin <[EMAIL PROTECTED]> wrote:
> Hi! Found here such a nasty thing. If you call the method
> controller through requestAction, the latter can not access
> methods model with which he works. Maybe it's wrong?
>
> Example:
> The method in the controller DocTypesController:
>
> index()
> {
>    $this->DocType->recursive = 0;
>    $docTypes = $this->DocType->getFullOpenedTree();
>    $this->set('docTypes', $docTypes);
>    if ($this->params['required'])
>       return $docTypes;
>
> }
>
> Method getFullOpenedTree - a method of model DocType.
>
> Under normal circumstances, if the start of this index browser - all
> OK
> Cake saw in the model DocType method getFullOpenedTree, if give a
> pull
> This index through requestAction - it is not.
>
> Writes:
> SQL Error: 1064: You have an error in your SQL syntax ....
> Query: getFullOpenedTree
>
> requestAction do like this:
> <? php $ docTypes = $ this-> requestAction ( '/ doc_types / index')?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to