Hi,

I am displaying cities and separating it by vertical line but the vertical
line should be removed if it is different state. Please guide me how I do that.
Thanks.

Here's my code:

<cfset count = 0>
<cfoutput query="getCountryRegions" group="countryRegionID">
<cfquery name="getCount" datasource="#DSN#">
SELECT count(countryRegionID) AS cityCount
FROM CountryRegionsGroup WHERE countryRegionID =
#getCountryRegions.countryRegionID#
GROUP BY countryRegionID
</cfquery>
<cfquery name="getC" datasource="#DSN#">
SELECT countryRegionID, regionID, stateID
FROM CountryRegionsGroup WHERE countryRegionID =
#getCountryRegions.countryRegionID#
</cfquery>

<div class="destTitle"><a
href="region_index.cfm?SRID=#getCountryRegions.cou ntryRegionID#&RegionName=#getC
ountryRegions.crName#" class="arial12">#getCountryRegions.crName#</a></div>
<div>Find courses in
<ul>
<li><cfoutput group="regionID"><cfif countryRegionID IS
getC.countryRegionID AND stateID IS getC.stateID>
</cfif>&nbsp;<a
href="city_index.cfm?rid=#getCountryRegions.region ID#&stateID=#getCountryRegions
..stateID#&SRID=#getCountryRegions.countryRegionID #">#getCountryRegions.rName#</a
> <cfif getCount.citycount EQ count><cfelse>&nbsp;|</cfif></cfoutput></li>
</ul>
</div>
<br clear="left" />
</cfoutput>


My desired output:

Arizona Find courses in Phoenix/Scottsdale | Tucson Area |
California Find courses in Los Angeles Area | Orange County | Palm
Springs/ Rancho Mir. | San Diego | San Francisco Bay Area |
Carolinas Find courses in Charleston | Charleston | Charlotte (Carolina
Trail) | Hilton Head |
Florida Find courses in Jacksonville/ St. Augustine | Miami to Fort
Lauderdale | Naples to Ft. Myers | Orlando | Tampa to Crystal River |
West Palm/ Boca/ Stuart |