Re: [PHP-DB] Using CURDATE, DATE_SUB and DATE_ADD

2003-02-10 Thread Jason Wong
On Monday 10 February 2003 06:57, Barrie Matthews wrote: > I am using the query below in attempting to control access to a web site. > The idea is that today's date must be between 1 month before the start date > and 1 month after the finish date. > > $query1 = "SELECT VFT_name FROM `vft` WHERE CUR

[PHP-DB] Using CURDATE, DATE_SUB and DATE_ADD

2003-02-09 Thread Barrie Matthews
I am using the query below in attempting to control access to a web site. The idea is that today's date must be between 1 month before the start date and 1 month after the finish date. $query1 = "SELECT VFT_name FROM `vft` WHERE CURDATE() > DATE_SUB(VFT_date_start, INTERVAL 1 month) AND CURDATE()