Ekrem Tapan

Ekrem Tapan

  • NA
  • 967
  • 80.7k

MySQL query Filter

Oct 6 2015 10:42 AM
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)