if I'm building a query with an unknown number of field/value pairs in the where clause, is there a more graceful way of appending the appropriate ANDs to the statement than just adding it regardless and then stripping the last one off after the loop has executed?

to illustrate: http://snapfire.com/index.phps