Skip to main content
December 22, 2006
Question

Displaying MySQL Recordset In Two Table Columns

  • December 22, 2006
  • 1 reply
  • 358 views
I've got a MySQL recordset which is displaying a list of companies and no other data. I want to display those companies so that there isn't just one long list on my page but instead have it divided between two columns in a table (or some other way). And if there's an odd number of companies I want the left column to display the extra. For example:

Company A Company F
Company B Company G
Company C Company H
Company D Company I
Company E

Thanks.
This topic has been closed for replies.

1 reply

Inspiring
December 22, 2006
SilverR252 wrote:
> I've got a MySQL recordset which is displaying a list of companies and no other
> data. I want to display those companies so that there isn't just one long list
> on my page but instead have it divided between two columns in a table (or some
> other way).

If you're using PHP with MySQL, try the Horizontal/Vertical Looper
created by Tom Muck:

http://www.tom-muck.com/extensions/help/HorizontalVerticalLooperHelp/

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
December 22, 2006
Thanks. That was exactly what I was looking for.