title: How to search with multiple criteria from a database with SQL?
body: <p>I am a newbie programmer. I have a page looks like below. I have a car database and i have to make a search from database with this page. There are many criterias that Users can enter and select values. But User doesn't have to fill or select all criterias. For example User can search a car that only depends on "Mark" or can search that depends on  Year="2007" Fuel="diesel" Gear="Automatic"... etc. My problem is how to design a query that can detect which controls have value or not. I use C# and MSSQL Server.</p>
  
  <p><a href="http://img8.imageshack.us/img8/5781/searchad.jpg" rel="nofollow noreferrer">alt text http://img8.imageshack.us/img8/5781/searchad.jpg</a></p>