I have a search form, where the user can select fields using checkboxes. There are 3 broad categories, (topic, age, media)and under these categories, are sub categories, which can be selected using checkboxes. A user can select checkboxes in any category, or none, or a single category.
How can I do a sequential search, for instance, if he selects topics and age, then get all records for the tyopics and within those topics, the age groups specified. Or topic and media, or topic and age and media? Can I use a CFLOOP to loop through the records?
Any help will be great, I dont even know how to start writing the CFML and SQL for this.
My query below doesnt work.
<cfquery name="retrieve" datasource="#MyDsn#" debug>
SELECT * FROM tblTools WHERE TopicIDFK ='#listgetat(SelectedTopic,SelectedTopicIndex,","
#'
AND AgeIDFK ='#listgetat(SelectedAge,SelectedAgeIndex,","
#'
AND MediaIDFK='#listgetat(SelectedMedia,SelectedMediaIndex,","
#'
</cfquery>
Thanks
ahksar
How can I do a sequential search, for instance, if he selects topics and age, then get all records for the tyopics and within those topics, the age groups specified. Or topic and media, or topic and age and media? Can I use a CFLOOP to loop through the records?
Any help will be great, I dont even know how to start writing the CFML and SQL for this.
My query below doesnt work.
<cfquery name="retrieve" datasource="#MyDsn#" debug>
SELECT * FROM tblTools WHERE TopicIDFK ='#listgetat(SelectedTopic,SelectedTopicIndex,","
AND AgeIDFK ='#listgetat(SelectedAge,SelectedAgeIndex,","
AND MediaIDFK='#listgetat(SelectedMedia,SelectedMediaIndex,","
</cfquery>
Thanks
ahksar