Question
Displaying multiple pages
I am executing a query that results in output that needs to
be displayed over several pages. The DB has been furnished by my
client who gets new updated copies of the DB periodically so I
cannot modify the tables in the DB. They are simply to be replaced
each time a new DB is furnished.
The problem is that there is a column called 'Series' which has the same value for multiple part numbers (based on color or size) and my client only wishes to display one of the images associated with each 'Series' value. This part is not a problem.
However, since I return many more records than will result in ouput, I have no way of knowing, in advance, how many records will be processed to result in the number of images established for each page. Thus, while I could pass the last record processed to the next page, I do not know what to pass if the viewer wants to go from page 1 to page 7, for example. And, I have no idea what value to set as the last value for a loop or output statement.
Would processing the entire query at one time to extract all the displayable values and stuff these into an array be the appropriate approach and then just pass the start and end records of the array for each page or is there a more elegant way to do this?
Does anyone have a solution to this problem?
The problem is that there is a column called 'Series' which has the same value for multiple part numbers (based on color or size) and my client only wishes to display one of the images associated with each 'Series' value. This part is not a problem.
However, since I return many more records than will result in ouput, I have no way of knowing, in advance, how many records will be processed to result in the number of images established for each page. Thus, while I could pass the last record processed to the next page, I do not know what to pass if the viewer wants to go from page 1 to page 7, for example. And, I have no idea what value to set as the last value for a loop or output statement.
Would processing the entire query at one time to extract all the displayable values and stuff these into an array be the appropriate approach and then just pass the start and end records of the array for each page or is there a more elegant way to do this?
Does anyone have a solution to this problem?