Solved

output query - alternating table cells

Posted on 2003-12-10
6
172 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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
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 75 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

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

617 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