I am working on a page containing the following mysql line. The main goal is simply to combine the current digit of the week with the current date.
$sql = "select distinct weekNum from " . DB_PREFIX . "schedule where DATE_ADD(NOW(), INTERVAL " . SERVER_TIMEZONE_OFFSET . " HOUR)"
According to my research, DATE_ADD()
it allows you to add a certain number of days to a date.
So I guess that DATE_ADD(NOW()
adds the current date to ... well date?
What exactly is doing INTERVAL
in this status.
Any supporting explanatory spaces clarifying the above statute would be greatly appreciated.
source
share