
05-03-04, 03:25 AM
|
|
New Member
|
|
Join Date: May 2004
Location: Letala
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Print MySQL resultset to five columns HTML-table
I think my problem is a simple one, but it is difficult enough for me.So, I would like to print my MySQL resultset to the HTML table like this: 5 columns and two rows. I need to retrieve LIMIT 10 records.
Besides I need to calculate how many times must be printed default image to the cells if there are not 10 records in the table (for instance it must be printed 3 times default image to the HTML table if I have 7 thumbnails in the table). This calculation seems to work fine, but my HTML table output is wrong. The output is this kind now:
|default.jpg | default.jpg | default.jpg |
|1 thumbnail | 2 thumbnail| 3 thumbnail | 4 thumbnail |
| 5 thumbnail | 6 thumbnail | 7 thumbnail |
3 rows with 3 + 4 + 3 items and this is not pretty, isn't.
I have some confusion with my loops...could someone tell what is the correct way to print MySQL resultset to HTML table with five columns?
Last edited by morrowind; 05-03-04 at 03:28 AM.
|