Guys who can help me solve this, Its been on stackoverflow for days without a comment

http://stackoverflow.com/questions/15948884/generate-sql-query-from-culmulative-filters-passed-in-from-the-post