I think there is a problem on my parameter on the controller. Because once my other tables has multiple entries, the data on the row is duplicated for my main controller.
See my code and parameter and the SQL query cakephp produces.
http://bin.cakephp.org/saved/44445
The default for cakephp
- $this->set('pdffiles', $this->paginate());
- ON (`Status`.`pdffile_id` = `Pdffile`.`id`) WHERE 1 = 1 LIMIT 20
- $this->Pdffile->recursive = 0;
- $parsedConditions['Pdffile.user_id'] = $this->Auth->User('id');
- $this->set('pdffiles', $this->paginate());
- ON (`Status`.`pdffile_id` = `Pdffile`.`id`) WHERE `Pdffile`.`user_id` = 17
- ORDER BY `Pdffile`.`timestamp` desc LIMIT 50
How could this be fixed?
--
Louie Miranda (lmiranda@gmail.com)
http://www.louiemiranda.net
Quality Web Hosting - www.axishift.com
Pinoy Web Hosting, Web Hosting Philippines
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment