On Tuesday 12 November 2002 22:10, arch wrote:
> Hi..
> I'm using php to pull data from a mysql table and output it to the browser.
> Pretty basic stuff. The problem is that the output is very slow, seen from
> the browser end, because the html output isn't displayed at all until all
> the data has been retrieved. Actually it's just the <table> part of the
> html that delays. Every <table> row corresponds to a row from the mysql
> table, and many rows are being displayed.
> However, I've seen php generated pages that display the data even as it's
> being pulled from the database. So the delay time isn't as hard to endure.
> I'm wondering if anyone knows what the trick is to output a large volume of
> html data from php in the second way. I've tried adding flush to the end of
> every iteration of the loop that's looping through the rows of data, but it
> doesn't help.

Most browsers only start rendering tables when they see the </table> tag. One 
solution is to split your single table into multiple tables each with, say 10 
rows. However one drawback using this method is that if you do not specify 
the column widths then they can vary from table to table and it may look a 
bit odd.

Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

Objects are lost only because people look where they are not rather than
where they are.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to