Jump to content


Photo

mysql multaple rows


  • Please log in to reply
3 replies to this topic

#1 dragongamer

dragongamer
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 07 April 2006 - 09:14 AM

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.

#2 freakus_maximus

freakus_maximus
  • Members
  • PipPipPip
  • Advanced Member
  • 177 posts

Posted 07 April 2006 - 03:30 PM

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.

#3 dragongamer

dragongamer
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 07 April 2006 - 09:27 PM

do you have and example, i am aming for 3 columes and 10 rows for each page.

#4 Jean Poutine

Jean Poutine
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 09 April 2006 - 06:31 AM

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]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users