Hi All,
First off I am new to this CF stuff so please take it easy on me
I have links on one page with price ranges in the URL like.
$0 to 100000 (min&max)
$100000 to 200000 and so on. What I am trying to do is make it so when someone clicks on one of these links and their are no products to display for that price range they will recieve a message. I am trying to do this with the CFIF tags with no luck. If their are no records to display I am assuming the #price# will be 0 thus display the message. I really confused about this CFIF stuff. Please help. Below is my code. Thank You!
<CFPARAM name="URL.min" Type= "any">
<CFPARAM name="URL.max" Type= "any">
<!--- Defined --->
<!--- Start Query --->
<cfquery name="getall_res"
datasource="whatever"
dbtype="ODBC">
SELECT ID, ref_number, smpic, address, city, short_description, price
FROM Listings
WHERE catagory = 'City'
AND price >= #URL.min#
AND price <= #URL.max#
ORDER BY price
</cfquery>
<!--- End Query --->
<html>
<head>
<cfinclude template="MainHeader.txt">
<table width="520" border="0" cellpadding="0" cellspacing="0" height="100%">
<cfif isdefined ("URL.min"
>
<cfif isdefined ("URL.max"
>
<cfif URL.min EQ "0">
<cfelseif URL.max LT "1">
<cfelse>
Sorry no products in this price range.
</cfif>
</cfif>
</cfif>
<!--- Start Output --->
<cfoutput query="getall_res">
<tr>
<td height="123" valign="top" colspan="2"><a href="ResAllChild.cfm?smpic=#ID#"><img src="listings/#smpic#.jpg" border="0" align="left"></a>Number:
#ref_number#<br>
Address: #address#<br>
City: #city#<br>
#short_description# <br>
<b><font color="##FF0000">$#DecimalFormat(price)#</font></b> </td>
</tr>
<tr>
<td width="1" height="21"></td>
<td valign="middle" width="520" align="center"><img src="images/Topline.gif" width="505" height="1"></td>
</tr>
</cfoutput>
<!--- End Output --->
</table>
<cfinclude template="MainFooter.txt">
</body>
</html>
First off I am new to this CF stuff so please take it easy on me

$0 to 100000 (min&max)
$100000 to 200000 and so on. What I am trying to do is make it so when someone clicks on one of these links and their are no products to display for that price range they will recieve a message. I am trying to do this with the CFIF tags with no luck. If their are no records to display I am assuming the #price# will be 0 thus display the message. I really confused about this CFIF stuff. Please help. Below is my code. Thank You!
<CFPARAM name="URL.min" Type= "any">
<CFPARAM name="URL.max" Type= "any">
<!--- Defined --->
<!--- Start Query --->
<cfquery name="getall_res"
datasource="whatever"
dbtype="ODBC">
SELECT ID, ref_number, smpic, address, city, short_description, price
FROM Listings
WHERE catagory = 'City'
AND price >= #URL.min#
AND price <= #URL.max#
ORDER BY price
</cfquery>
<!--- End Query --->
<html>
<head>
<cfinclude template="MainHeader.txt">
<table width="520" border="0" cellpadding="0" cellspacing="0" height="100%">
<cfif isdefined ("URL.min"

<cfif isdefined ("URL.max"

<cfif URL.min EQ "0">
<cfelseif URL.max LT "1">
<cfelse>
Sorry no products in this price range.
</cfif>
</cfif>
</cfif>
<!--- Start Output --->
<cfoutput query="getall_res">
<tr>
<td height="123" valign="top" colspan="2"><a href="ResAllChild.cfm?smpic=#ID#"><img src="listings/#smpic#.jpg" border="0" align="left"></a>Number:
#ref_number#<br>
Address: #address#<br>
City: #city#<br>
#short_description# <br>
<b><font color="##FF0000">$#DecimalFormat(price)#</font></b> </td>
</tr>
<tr>
<td width="1" height="21"></td>
<td valign="middle" width="520" align="center"><img src="images/Topline.gif" width="505" height="1"></td>
</tr>
</cfoutput>
<!--- End Output --->
</table>
<cfinclude template="MainFooter.txt">
</body>
</html>