I have a list of clients (about 50,000) that is about 500 pages long. To show this, I have a webpage that lists all the clients and pages them in increments of 100 clients per page.
I'd like to be able to print (to a phyiscal printer) the entire list of clients, but the problem is, I don't know how to do it without displaying all 50,000 records on the screen at the same time. This creates a serious memory problem when PHP tries to parse and display all of them at once.
Is there a way to somehow run the query and parse the results into a printer spool (like print preview) via PHP headers or something instead of displaying the output to the browser?
I'm struggling with this, so if anyone has any good ideas, it'd be much appreciated.