Can you place COUNT within a WHERE statement?
My query retreives image names from an Images Table for metro areas within a state.
I have a checkbox on the page before the query asking them if they want to only include metro areas with photos, if it is checked then then I want to display only the metro areas with photos.
How can I check if a metro area has photos within it?
My query retreives image names from an Images Table for metro areas within a state.
Code:
SELECT imageState, imageName
FROM Images
WHERE imageState= #URL.state#
I have a checkbox on the page before the query asking them if they want to only include metro areas with photos, if it is checked then then I want to display only the metro areas with photos.
How can I check if a metro area has photos within it?
Code:
SELECT imageState, imageName
FROM Images
WHERE imageState= #URL.state#
<cfif ISDefined("FORM.photos")>AND image.COUNT > 0</cfif>