This can happen when Cake cannot locate the file for your model. Check that the file isnamed correctly: for MyModel the filename should be my_model.php.
On Fri, Sep 4, 2009 at 11:27 PM, learning_cake_php<lunaro...@gmail.com> wrote: > > well i dont know why cake behaves like this.. > i had model: > > class MyModel extends AppModel{ > ..................... > ..................... > //then i had a method > function myMethod(){ > ......................... > ......................... > } > > } > > when trying to call that method in my controller: > > class MyModelController extends AppController{ > ............................ > ............................ > > $this->MyModel->myMethod(); > > } > > cake is trying to execute it as an sql function thats why i got this > error invalid sql something.. > $this->MyModel->myMethod() is just a method used to pass data from my > controller to the model. > i had the same method on my other 2 models and it works fine only in > my third model cake interprets it as an sql function... > please help guys... > > > --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---