would your first suggestion do a better (~faster) job?
I prefer your second suggestion but I have the following issue: I also search on single dates and date ranges in that same query. I haven’t been able to find the right way to do a query on them however (http://forum.servoy.com/viewtopic.php?t=1383)
especially by date columns use the ‘?’ in the SQL, sample:
controller.loadRecords("select <tablepk> from <table> where (<table>.username = 'marcel' and <table>.datecolumn > ?) or <table>.datecolumn < ?", new Array(startDate,endDate))