It looks like you haven't really studied the whole MVC, separation of concerns thing. You shouldn't be calling functions in the model from the view. You shouldn't even be calling controller functions from the view. In short, the controller queries the model and then sends the information on to the view to be displayed.
In this case though, if you're determined to make it work, create a function in your controller that calls the function in your app_model and sets a view variable with the result. That will then work fine when called via requestAction. This will work, but it's not exactly best practice. Tufty On Dec 17, 6:07 am, manuj bansal <[EMAIL PROTECTED]> wrote: > i know the metod of calling functions from controller and settinng > variable > > but i have to call it fron view file > > i found 1 method > > requestAction > > but i am not find way how to call function from app_model > > On Dec 17, 10:58 am, Grant Cox <[EMAIL PROTECTED]> wrote: > > > Please be more clear in your question. > > > You cannot call model functions from a view. You must call the model > > function from your controller, and set() the data for the view. > > > On Dec 17, 3:09 pm, manuj bansal <[EMAIL PROTECTED]> wrote: > > > > my code is as follows > > > ***********************************app_model.php > > > (code)*************************** > > > > function abc($y) > > > { > > > $v = $this->query(using $y); > > > return $v;} > > > > *************************************default.ctp > > > (code)********************************** > > > > i want to call above function frome here by passing some argument > > > > ***************************************************************************-******************- > > > Hide quoted text - > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---