Reputation: 1902
I print my table like that:
print $tableHeader . $dataRow . $tableFooter;
the $dataRow is the result of a loop (getting data from DB and building the row, nothing unusual), it's something like:
while ($obj = mysql_fetch_object($res)) {
$dataRow .= ' <td width="210" style="...">' . $obj->title . ' <br /> '. $obj->screenName .' </td>';
...
...
}
The problem is when there is a huge amount of information to handle => huge amount of rows to build before displaying the final table.
How could I tell Apache to display it row by row ?
Upvotes: 0
Views: 111
Reputation: 38
You could do it with Ajax.
I personnally use DataTables which can do the two things : http://www.datatables.net/
Hope that helps !
Upvotes: 1
Reputation: 1162
Can't you paginate?
the way to go is to tell php to display piece by piece, but you will have to change your code a bit to something like.
print $tableHeader
while ($obj = mysql_fetch_object($res)) {
print ' <td width="210" style="...">' . $obj->title . ' <br /> '. $obj->screenName .' </td>';
flush();
}
print $tableFooter;
Upvotes: 0