Weather or not
Typically, bad weather means some sort of a slow down. I tend to joke about how weather in general grinds the traffic of Pennsylvania to a halt. Of course I grew up having to deal with real bad weather in the upper midwest, where once it snows it doesn’t melt until the following spring. But this past weekend, weather has certainly brought things to a halt, from a weather delayed World Series game, to a suspended one, and now this morning it seems that aside from traffic crawling, so is our web connection. Inevitably, this will cause much frustration as I have a lot of programming to work on, which usually means frequent uploading and tests, and when I get slowed down, I get frustrated (almost as much as being interrupted constantly). But as they say, the show must go on.
I’ve been working on a coldfusion search function that basically gives the end user ability to search any field with any type of comparison. In my years of programming coldfusion, I haven’t yet actually seen something that works, where it could build the form and the types of searches capable (date, number, text would be different options) so I made a basic one. Of course I’ve created a static search page, after all, some of the fields don’t work simply to the average user, such as ID fields, or fields that would have a selection based on a drop down, but it is still evaluating the search dynamically. On my form, for each field being searched, I have 3 fields, the first one being a drop down of the available comparison types, the second being the search field (either a text box or drop down), and the third being a hidden field to tell the database what data type the field is. This way I can loop through the form submission and create the sql query (including CFQUERYPARAM to help sanitize data) on the fly. In the end, what you have is a custom, yet dynamic search function that can be reused anywhere you need, just have to change the names of the fields to whatever you need in the database and pass through the table in your function.