Dear All
I have a MySQL db and inside it a table called ProductMaster with 6 fields "Product_Id,Product_Name,Model,Opening_date,Closing_Date,Status". Opening_Date and Closing Date Can accept null values.So some records has values for this field
I have the below query to display records from this table.
"select Product_Id,Product_Name,Model from ProductMaster where Status=1"
Now I want to change the query to have a filter on the Opening_Date and Closing_Date if they are not null
Ex : If a Record is having Opening_Date as 05/01/2009 and Closing Date as 05/30/2009 Then i want to check whether today is a date in between these two dates and if Yes ,Returns the records
If both field values are empty, Return Records
Can any one help me to frame the query ? Thanks in advance