bostboy — 2012-02-18T13:10:45-05:00 — #1
I have a master table and a detail table and want to perform a query returning only a certain number of master records that can be processed as a limit so I can paginate the full set. So if each master has a different number of detail records, putting a limit on the query limits it based on the number of detail records which is the total number of records retrieved.
In this case, do I need to do a master query first and then process all the detail queries based on the master return?
Hope that makes sense, if not let me know.
r937 — 2012-02-18T14:20:59-05:00 — #2
that would work quite well, except you have a bit more coding to do in the application to "merge" the two result sets
bostboy — 2012-02-18T14:39:28-05:00 — #3
Thanks for the input. I have decided to go that route and it so far works just fine and gives me more control and seems to process very efficiently as well. I am doing a master query and then a single detail query after building an IN clause with the first query key values and then will process the merge in PHP. Thanks again.