FREAK UNBIND !

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

FREAK UNBIND !

andrzejborkowski@gmail.com

function autocomplete(){
    $this->layout = "ajax";
    //*************
    $this->User->unbindModel('Message');
    $this->Message->unbindModel('Message');
                //************************8

    if(empty($this->params['data'])){
    echo "DaTA EMPTY";
        }else{
        $data = $this->User->findAll(" User.username LIKE
'%{$this->data['Message']['to']}%' ",null,null,null,null,0);
        $this->set('tags', $data);
         }
        }

but it isnt work, this controler still loading data from message model,
its very faking no logic becouse, i want only user data witch recursive
0 on page i see faking data from message model WRRR ! HELP


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: FREAK UNBIND !

krazynio

You forgot the associations.
$this->User->unbindModel(array('hasMany'=>array('Message')));

:)

On 11/6/06, [hidden email] <[hidden email]> wrote:

>
> function autocomplete(){
>         $this->layout = "ajax";
>     //*************
>         $this->User->unbindModel('Message');
>         $this->Message->unbindModel('Message');
>                 //************************8
>
>         if(empty($this->params['data'])){
>                 echo "DaTA EMPTY";
>         }else{
>                 $data = $this->User->findAll(" User.username LIKE
> '%{$this->data['Message']['to']}%' ",null,null,null,null,0);
>                 $this->set('tags', $data);
>          }
>         }
>
> but it isnt work, this controler still loading data from message model,
> its very faking no logic becouse, i want only user data witch recursive
> 0 on page i see faking data from message model WRRR ! HELP
>
>
> >
>


--
Best regards,
Nio

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---