Jump to content

Archived

This topic is now archived and is closed to further replies.

dragongamer

mysql multaple rows

Recommended Posts

i have a script that shows a reslut every line e.g


|----------|
| a |
|----------|


|----------|
| b |
|----------|



how can i make it so it shows more that one line e.g


|---------| |--------|
| a | | b |
|---------| |--------|


have seached over the net and not found anything if anybody knows of a tut or code spipet or exaple.

Share this post


Link to post
Share on other sites
Post your script please. Hard to help without seeing what you are doing.

Other than that I would say you are probably inserting a <br> after each retrieved value. Are you trying to return a limited number of results horizontally then have it begin a new row? If so, you are going to need to design a loop to run through and then once your limit is reached have it create a new row then repeat the loop. This should continue until all values are displayed (such as a WHILE loop).

The question of displaying query results to x number of columns has been asked multiple times and many solutions provided. You should find your answers that way. But if not, post some code and we will see what we can do.

Share this post


Link to post
Share on other sites
I ran into this problem when I was working on an image gallery that uses mysql. While it's possible to get rather elaborate, this is a simple solution I found that works:

[a href=\"http://codewalkers.com/tutorials/15/2.html\" target=\"_blank\"]http://codewalkers.com/tutorials/15/2.html[/a]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.