Re: Sepating MySQL result set into html tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Thodoris wrote:
Hello everybody,
I have a mysql result set that I want to print out in an html table. But some times it gets so big that I will probably need to separate it in to multiple ones. I wrote a function that separates the result set into three ones like this:

...

But I really need to tell the function in how many tables I need the result set to be separated. How can I do this?

What can I put instead of this for 3 tables: (($j == $limit-1) || ($j == (2*$limit)-1))

I can't find the algorithm although I think I have done this before but I can't remember how.


Why not just use LIMIT in your query and make several?

Because this like I am paging with a limit in every table but I need to print all the tables into a single page.


Why do you need to split the data into multiple tables, anyway?


Because their columns are just three and if they become long you waste space in the page.

   $table = "<table class='inner'>";

   $table .= "<table><tr><td><table class='inner'>";

That's going to give you badly-formatted HTML.


Yes it will but I will make this better along with other things as long as I find the needed algorithm.

--
Thodoris


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux