Re: Need help converting this MySQL command into cakePHP find()

2009-05-07 Thread liaogz82
Sorry this doesnt work. It still gives me this error: Warning (512): SQL Error: 1054: Unknown column 'SubscriberContact' in 'where clause' [CORE/cake/libs/model/datasources/dbo_source.php, line 514] is there a way to use joinModel method? On May 6, 3:59 pm, Mohsin Kabir mohsint...@gmail.com

Re: Need help converting this MySQL command into cakePHP find()

2009-05-07 Thread liaogz82
sorry mistake. I have correct the unknown column problem. But i faced another issue Undefined variable: conditions [APP/controllers/ subscribers_controller.php, line 24] On May 8, 10:09 am, liaogz82 liaog...@gmail.com wrote: Sorry this doesnt work. It still gives me this error: Warning

Re: Need help converting this MySQL command into cakePHP find()

2009-05-06 Thread Mohsin Kabir
Hello , There is easy solution here : here you should First: make association subscribers has many subscriber_contacts and subscriber_contacts belongs to subscribers Second: # find IDs of friends here $friends = $this-Subscriber-SubscriberContact-find(’list’, array(’conditions’