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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.