Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 23rd, 2005, 02:35 PM
skinnybloke
Guest
 
Posts: n/a
Default 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.
  #2  
Old December 23rd, 2005, 04:25 PM
John Meyer
Guest
 
Posts: n/a
Default Re: How do I line up SQL query results 3 across the page?

skinnybloke wrote:
[color=blue]
> 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.[/color]


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.
  #3  
Old December 24th, 2005, 10:05 AM
skinnybloke
Guest
 
Posts: n/a
Default Re: How do I line up SQL query results 3 across the page?

Thanks - I'll give that a Go,

On Fri, 23 Dec 2005 09:09:18 -0700, John Meyer
<john.l.meyer@gmail.com> wrote:
[color=blue]
>skinnybloke wrote:
>[color=green]
>> 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.[/color]
>
>
>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.[/color]

Thanks - I'll give that a Go,
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles