473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How do I line up SQL query results 3 across the page?

Hi - can anybody point me to a tutorial to do the following:
I am running a SQL SELECT statement which returns the URL addresses of
images which when clicked on will link to another page - no problem in
doing that.

What I am having difficulty in is lining these up in a html table 3
images across the page.

i.e.

<table>
<tr>
<td>image</td>
<td>image</td>
<td>image</td>
</tr>
<tr>
<td>image</td>
<td>image</td>
<td>image</td>
</tr>
</table>

Any help would be appreciated.
Dec 23 '05 #1
2 1415
skinnybloke wrote:
Hi - can anybody point me to a tutorial to do the following:
I am running a SQL SELECT statement which returns the URL addresses of
images which when clicked on will link to another page - no problem in
doing that.

What I am having difficulty in is lining these up in a html table 3
images across the page.

i.e.

<table>
<tr>
<td>image</td>
<td>image</td>
<td>image</td>
</tr>
<tr>
<td>image</td>
<td>image</td>
<td>image</td>
</tr>
</table>

Any help would be appreciated.

The modulus operator in the while loop you're fetching the results in works
wonders. Basically, set up a counter, check to see if the counter modulus
3 = 0. If it does, break off that row and start a new one.
Dec 23 '05 #2
Thanks - I'll give that a Go,

On Fri, 23 Dec 2005 09:09:18 -0700, John Meyer
<jo**********@gmail.com> wrote:
skinnybloke wrote:
Hi - can anybody point me to a tutorial to do the following:
I am running a SQL SELECT statement which returns the URL addresses of
images which when clicked on will link to another page - no problem in
doing that.

What I am having difficulty in is lining these up in a html table 3
images across the page.

i.e.

<table>
<tr>
<td>image</td>
<td>image</td>
<td>image</td>
</tr>
<tr>
<td>image</td>
<td>image</td>
<td>image</td>
</tr>
</table>

Any help would be appreciated.

The modulus operator in the while loop you're fetching the results in works
wonders. Basically, set up a counter, check to see if the counter modulus
3 = 0. If it does, break off that row and start a new one.


Thanks - I'll give that a Go,
Dec 24 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: nao | last post by:
Hi all! I am aware that this question might involve Javascript and MySQL. So far I haven´t found a suitable solution in JavaScript ng´s - maybe becauese php-programmers are more likely to come...
6
by: Bob Bedford | last post by:
I've a query quite important to execute. I've to fill an array with all result, so the query is called once wich returns all ID's Then I call the same query a second time as I shown only 10...
2
by: shank | last post by:
I have a search page with 7 different field options to search upon. The user can use any or all options. On the results page I'd like to put at the top of each column and ASC and DESC link to...
8
by: Rigga | last post by:
Hi, I am new to mysql and need help on how to join tables. I have a database which contains 4 tables, the main table contains information by date order and the other 3 contain data also in date...
2
by: carl.barrett | last post by:
Hi, I'm back with the same question as I still can't get it to display my data the way I want it to. The table lists information about a perpetrator involved with an anti social behaviour...
6
by: gerbski | last post by:
Hi all, I am relatively new to ADO, but up to now I got things working the way I wanted. But now I've run into somethng really annoying. I am working in MS Access. I am using an Access...
3
by: santoni | last post by:
I really need help me with this. I'm sure it's really easy for most. I really appreciate any help. Thanks! I have tables Employee and Sales. In Employees the yes/no field IsManager denotes...
14
by: Simon Gare | last post by:
Hi, have a search.asp page with results.asp page drawing data from an SQL db, problem is the user has to type the whole field value into the search box to retrieve the value on results.asp, what...
3
by: DigitalWallfare | last post by:
Hi all, This is my first post here, but i've lurked for a while. I'm working on a website but have come across a major stumbling block in the code: I've managed to structure the search query...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.