Jump to content

mysql multaple rows


dragongamer

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.
Link to comment
https://forums.phpfreaks.com/topic/6796-mysql-multaple-rows/
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.
Link to comment
https://forums.phpfreaks.com/topic/6796-mysql-multaple-rows/#findComment-24779
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]
Link to comment
https://forums.phpfreaks.com/topic/6796-mysql-multaple-rows/#findComment-25155
Share on other sites

Archived

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

×
×
  • Create New...

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.