Programming instructions
Developing a search capability 79
4 Verify that the price and departureDate are now considered in the query, as in step
4 in the previous exercise:
a Open the tripsearch.cfm page in the my_app directory in your browser.
b In the Departure Date drop-down list box, select Before, enter 1/1/1900 as the
date, and select Smaller Than 0 for the price.
c Click the Search button.
Now, because the departure date is considered in the query, there are no rows
returned.
Note: If you planned to use many more fields as search criteria, the approach used to
add departure date and price criteria to the Trip Search form is not the most elegant
solution. A generic routine to handle WHERE clause string construction based on
specific data types could reduce the code and be a more extensible solution then the
one presented here. This more extensible approach is beyond the scope of this tutorial,
however.