Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

output query - alternating table cells

Posted on 2003-12-10
6
Medium Priority
?
173 Views
Last Modified: 2013-12-24
my output query:

<cfoutput query="drs"><tr>
               
            <td width="7%" valign="top"><a href="detail2.cfm?DrID=#drs.DrID#"><img src="../images/doctors/thumbs/#drs.thumb#" alt="Dr.#drs.LastName#" border="0"></a></td>
            <td width="93%" valign="top">
<p><a href="detail2.cfm?DrID=#drs.DrID#">#FirstName# #MI# #LastName# #Type#</a>
<br>#Blurb#</p> </td>
  </tr></cfoutput>

this is the way it looks now:
http://rothmaninstitute.com/ourdoctors/index.cfm

this is how i want it to look:
http://scoi.com/doctors/index.html
0
Comment
Question by:phillystyle123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9914931
<cfoutput query="drs"><tr>
               <cfif drs.currentRow /2>
               <td width="10%"></td>
               </cfif>
            <td width="7%" valign="top"><a href="detail2.cfm?DrID=#drs.DrID#"><img src="../images/doctors/thumbs/#drs.thumb#" alt="Dr.#drs.LastName#" border="0"></a></td>
            <td width="93%" valign="top">
<p><a href="detail2.cfm?DrID=#drs.DrID#">#FirstName# #MI# #LastName# #Type#</a>
<br>#Blurb#</p> </td>
  </tr></cfoutput>
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9914942
and change this

<td width="93%" valign="top">

to this
<td width="83%" valign="top">
0
 

Author Comment

by:phillystyle123
ID: 9915040
almost there! this is what i'm getting using your code:

http://rothmaninstitute.com/ourdoctors/index2.cfm
0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 25

Expert Comment

by:James Rodgers
ID: 9915124
<cfoutput query="drs"><tr>
               <cfif drs.currentRow /2>
               <td width="10%"></td>
               </cfif>
            <td width="7%" valign="top"><a href="detail2.cfm?DrID=#drs.DrID#"><img src="../images/doctors/thumbs/#drs.thumb#" alt="Dr.#drs.LastName#" border="0"></a></td>
            <td width="83%" valign="top">
<p><a href="detail2.cfm?DrID=#drs.DrID#">#FirstName# #MI# #LastName# #Type#</a>
<br>#Blurb#</p> </td>
<cfif NOT drs.currentRow /2>
               <td width="10%"></td>
               </cfif>

  </tr></cfoutput>
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 9915131
it looks like it is appearing on every row try mod instead of /
0
 
LVL 15

Accepted Solution

by:
danrosenthal earned 300 total points
ID: 9915181
Try this...

<cfoutput query="drs">
      <tr>
            <CFIF currentrow MOD 2 eq 0>
            <td></td>
            </cfif>
            <td valign="top"><a href="detail2.cfm?DrID=#drs.DrID#"><img src="../images/doctors/thumbs/#drs.thumb#" alt="Dr.#drs.LastName#" border="0"></a></td>
            <td valign="top" <CFIF currentrow MOD 2 neq 0>colspan="2"</cfif>><p><a href="detail2.cfm?DrID=#drs.DrID#">#FirstName# #MI# #LastName# #Type#</a><br>#Blurb#</p></td>
      </tr>
</cfoutput>
0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question