I have table for tasks list.
I usually use linux time to set the dates but this time I tried DATE type.
how can I select all the task that their targetDate is in 2 days or less?
I know how to do it in the SQL query:
SELECT * FROM tasks
WHERE `targetDate` >= CURDATE()
AND `targetDate` < DATE_ADD(CURDATE(), INTERVAL 2 DAY)
I would like it know how to do it in the PHP code
id int(10)
title varchar(250) utf8_general_ci
text text utf8_general_ci
catID tinyint(3)
createUserID int(4)
createDate date
targetDate date