I am about to start to build an advanced search option in my contract database.

I am building it using MSSQL and PHP, and have seen one in MySQL using build query, I wondered if somebody can give me some advice as the methods and code to do this.

Basically the advanced search will be 10 rows of drop downs, the first line having a drop down to select the field name, then the second drop down to select options of whether its +, =, <, > and so on, and then the final text field an open text input field for the keyword.

Thats the first line, but there 9 more of those, and they coudl all be used and build up to be the advanced search.

I havent started it yet, but just wanted to get some advice of the pro's.