Richard wrote: > the issue here is that there are various filters being built up from > different functions which is why we are having to do it as a string > and not directly inside a cfquery tag.
The issue here is that you are trying to use cfquery in a way it wasn't designed to be used, which is why you're having trouble trying the get the language to support your craziness. :) If you want to work with SQL-based databases, you have to work with queries - which in CF means using cfquery and cfqueryparam with individual queries, not trying to build up the statement from parts of strings scattered all over the place. If you want a more filter-based approach, you want to use something that is built around filtering, which (I think) is one of the main benefits of CouchDB and similar. Depending on exactly what you're doing, I'd probably just put the entire query in a single function, and use suitable arguments and switch/if statements to control what parts of the where clause is used, which is very likely to be more maintainable than having filters in different functions. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345689 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm