Hi all, I have the following schema:
Jobs HABTM parameters Parameters table has various columns such as temperature, pressure, etc. The join table jobs_parameters has some additional info called the run_time. It gets populated everytime a job is run with a parameter set. eg: Job: id name ---------------------- J1 Job01 J2 Job02 Parameter: id temperature pressure ------------------------------------------------- P1 100 101 P2 150 315 P3 102 300 jobs_parameters: id job_id parameter_id run_time ----------------------------------------------------- 1 J1 P1 00:00:00 2 J1 P2 17:30:00 3 J1 P3 09:30:00 4 J2 P2 00:00:00 5 J2 P1 12:30:00 6 J2 P3 14:30:00 The query is that: Find all jobs that used pressure '101' and '315' such that pressure '101' based job run_time was before '315'. Which in this case would return J1 only. I could write a simple query that has two sub queries created by joining Parameter and jobs_parameters, and join those two to find the result. How would I do this in Cake using find()? Appreciate all the help and for the great framework. Thanks, Inviz --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
