Skip to main content
Inspiring
March 29, 2008
Answered

Recordset question

  • March 29, 2008
  • 1 reply
  • 322 views
Noob question here. Couldn't find answer in the archives.

I can use the AND and/or OR statements all day long fine for simple filter
results.

Now I have a search form where there are several drop down fields to filter
with. I need to be able to have one user search maybe search with the Country
and State dropdowns, whereas another user might want to search using the
Gender and Height dropdowns.

In short, is there a way to create a recordset that will allow me to filter by
all, some and/or one dropdown depending on the users wishes? I see it done in
websites all the time but am not sure how it's handled.
This topic has been closed for replies.
Correct answer FWDWLVR
Actually just figured it out a few minutes ago. Thanks for the reply. Here's what I found out:

"Issues in Coldfusion referencing #form.checkbox#
and in PHP referecning <?php echo $_POST["checkbox"]; ?>

Please note that in Coldfusion and PHP, a checkbox within a form is not submitted in the request when it is not checked. Any QueryBuilder application in these languages that references a checkbox and makes a comparison against its unchecked value causes an error on the page, as the request will not contain the appropriate checkbox reference."

I changed the checkboxes to drop downs and the sreach/results work fine. I need to do some more reseacrh and find a fix for the checkbox issue. Ever heard of this? Know a workaround?

Regards,
Jared

1 reply

March 30, 2008
I'm not sure if this is right. but have you tried creating four record sets and then an if statement on the submit button to test and see what drop down menu they used. depending on that it would run the appropriate recordset.

FWDWLVRAuthorCorrect answer
Inspiring
March 30, 2008
Actually just figured it out a few minutes ago. Thanks for the reply. Here's what I found out:

"Issues in Coldfusion referencing #form.checkbox#
and in PHP referecning <?php echo $_POST["checkbox"]; ?>

Please note that in Coldfusion and PHP, a checkbox within a form is not submitted in the request when it is not checked. Any QueryBuilder application in these languages that references a checkbox and makes a comparison against its unchecked value causes an error on the page, as the request will not contain the appropriate checkbox reference."

I changed the checkboxes to drop downs and the sreach/results work fine. I need to do some more reseacrh and find a fix for the checkbox issue. Ever heard of this? Know a workaround?

Regards,
Jared