If your models are not directly related (as you've said above) you can
do this to load the other models.

var $uses = array('Job', 'OtherModel', 'OtherModel2');

function index() {
  $this->OtherModel->find('all');
  $this->OtherModel2->find('all');
  // ... etc
}

Or if you won't be using the other models in any other actions, you
could do this (leave out the var $uses):

function index() {
  $this->OtherModel = ClassRegistry::init('OtherModel');
  $this->OtherModel2 = ClassRegistry::init('OtherModel2');
  $this->OtherModel->find('all');
  $this->OtherModel2->find('all');
  // ... etc
}

On Dec 27, 9:14 am, "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)
> 2) iterate through results and insert/update values in job
> 3) display jobs
>
> Thank you in advance.
>
> Chad
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to