On Fri, Dec 26, 2008 at 5:14 PM, Chad Casselman <ccassel...@gmail.com> wrote: > I have a Controller for Jobs with a model Job. > > When I hit /jobs (the index function of Job Controller), I need to run a > query on 2 other tables (not joined to Job) to find values to manually > insert into jobs before actually displaying the index. > > I have tried several things but can't seem to make any progress on this. > > Can anyone help me with this? > > 1) select fields from a join on customers and packages (complex conditions)
I believe you want to bind those models to each other [1] > 2) iterate through results and insert/update values in job Once you setup the appropriate bindings, you can do a find('all') on them and iterate over the results of that. [2] may be clearer. > 3) display jobs I'm guessing that part already works with your index() action. > Thank you in advance. > > Chad [1] http://book.cakephp.org/view/86/Creating-and-Destroying-Associations-on-the-Fly [2] http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM -- Fedora 9 : sulphur is good for the skin ( www.pembo13.com ) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---