On Thu, Apr 2, 2009 at 8:46 AM, logout <[email protected]> wrote: > > class InvoiceProduct extends AppModel { > var $name = 'InvoiceProduct'; > var $belongsTo = array('Invoice'); > > function myFind() { > return $this->find('all'); > } > } > > (..) > $things = $this->Invoice->InvoiceProduct->myFind(); > > (..) > When I click on the Warning and then on the context I get this: > > $sql = "myFind" > $error = "1064: You have an error in your SQL syntax; check the manual > that corresponds to your MySQL server version for the right syntax to > use near 'myFind' at line 1" > $out = null
I'm not sure about the effectiveness of this, buy try add the InvoiceProduct in the "uses" attribute on your controller, and then try the query as: $things = $this->InvoiceProduct->myFind(); Best regards. -- MARCELO DE F. ANDRADE Belem, PA, Amazonia, Brazil Linux User #221105 http://mfandrade.wordpress.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
