title: How to create a single query with multiple where columns and value are optional
body: <p>for example,
  select * from a where id=@id and date between @date1 and @date2<br>
  when i passed  @id=1 @date1='09/29/17'and @date2='09/30/17'
  then an output is correct </p>
  
  <p>When I passed @id=0 (means no id found in a table) @date1='09/29/17'and @date2='09/30/17' then output comes between date and ignore id column </p>
  
  <p>means I want the filters like a shopping website  </p>