Just curious if this was possible or if this is what this code is for.
 
I have in my Bookmark model:
 
'Job' => array(
   'className' => 'Job',
   'foreignKey' => 'job_id',
   'conditions' => array('Job.status' => 0)
  )
 
So if I use the 'conditions' => array('Job.status' => 0), it will always
only pull where status = 0 which is what I want....
 
But how would I pass a variable to this also? I just am not sure how to pass
the $rank variable. So it always pulls status 0 and equal to or less than
users rank
 
'Job' => array(
   'className' => 'Job',
   'foreignKey' => 'job_id',
   'conditions' => array('Job.status' => 0 ,'Job.rank <=' => $rank)
  )
 
Now my only other question is if I needed to pull all bookmarks for some
admin reason would I be able to override the status  = 0 so I can grab all
bookmarks no matter what the status is?
 
Dave 

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to