Mysql query with optional where condition
I have a form which is used to search the database. The form consists of four fields, including two date fields: (Col1, Col2, Datefm, DateTo). Users have the option to fill the values in these fields. They may fill the…