1
Answer

MySQL query Filter

Ekrem Tapan

Ekrem Tapan

9y
295
1
Hello Everybody
 
i have a this query
 
Select * from Data Where SiteID=?SiteID and MainSID=?MainSID and AreaID=?AreaID and ContentType=?ContentType and now() >= DisplaySDate And now() < DisplayEDate order by SBID asc"
this query for site main banner then i want to show banner on mainpage when i not input DisplaySDate and DisplayEDate, so how to change this part
now() >= DisplaySDate And now() < DisplayEDate
 
i`m thinking this way but not working = ==
 
if(now() >= DisplaySDate, DisplaySDate = '0000-00-00 00:00:00') And if(now() < DisplayEDate, DisplayEDate='0000-00-00 00:00:00')
 
so you r guys have an any idea for this problem

Answers (1)