Link to home
Start Free TrialLog in
Avatar of JohnLucania
JohnLucania

asked on

cfif for skipping

I have;
<cfquery name="GetClient" datasource="...........>
select Firstname, lastname, ........
from Clients C, RideAppt R
where C.ClientID = R.ClientID
.....
</cfquery>

On the display,

<cfoutput query="GetClient">
<p>
<div align="center">
  <p><img src="bar.gif" width="500" height="9" alt="" border="0"></p>
    <table border="1" align="center" width="100%">
...........

    </table>
 </div>

What I want is to skip   <p><img src="bar.gif" width="500" height="9" alt="" border="0"></p> if Firstname and lastname are the same.

Thanks.



Avatar of tim_cs
tim_cs
Flag of United States of America image

Try adding this

<cfif firstName NEQ lastName><p><img src="bar.gif" width="500" height="9" alt="" border="0"></p>
<cfelse></cfif>
Avatar of JohnLucania
JohnLucania

ASKER

Oh!  I meant if the previous record and the next record are for the same person.

For instance,

John Doe.............
John Doe............
.............bar.gif............
Sue Doe
.............bar.gif............
ASKER CERTIFIED SOLUTION
Avatar of tim_cs
tim_cs
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great.  That works.