G
Gary
I am trying to do a simple "less than" conditional statement, and hitting a
brick wall if I use a database element with it.
This DOES work:
<%
if Request.QueryString("PC") < 10 then Response.Write("less than ten") else
Response.Write("more than or equal to ten") End if
%>
This DOES NOT work:
<%
if Request.QueryString("PC") < Record.Fields.Item("count(*)").Value then
Response.Write("less than COUNT") else Response.Write("less than or equal to
count") End if
%>
The only difference is that in the first example a number is used as the
condition. in the second example, I have counted the number of rows in a
table, and I want to use that number as the condition. The SQL select is:
SELECT count(*), EnquiryDate
FROM lfmasterleads.partner_enquiries
WHERE EnquiryDate = CURRENT_DATE() GROUP BY EnquiryDate
Any help greatly appreciated!
Darren.
brick wall if I use a database element with it.
This DOES work:
<%
if Request.QueryString("PC") < 10 then Response.Write("less than ten") else
Response.Write("more than or equal to ten") End if
%>
This DOES NOT work:
<%
if Request.QueryString("PC") < Record.Fields.Item("count(*)").Value then
Response.Write("less than COUNT") else Response.Write("less than or equal to
count") End if
%>
The only difference is that in the first example a number is used as the
condition. in the second example, I have counted the number of rows in a
table, and I want to use that number as the condition. The SQL select is:
SELECT count(*), EnquiryDate
FROM lfmasterleads.partner_enquiries
WHERE EnquiryDate = CURRENT_DATE() GROUP BY EnquiryDate
Any help greatly appreciated!
Darren.