Can i use num_daysopen in the second select
SELECT
DATEDIFF(DATE(NOW()), DATE(dateopened)) AS num_daysopen,
(28 - DATEDIFF(DATE(NOW()), DATE(dateopened))) as days_left
FROM table
The following does not seem to work, it would be more readable than the above if it did?
SELECT
DATEDIFF(DATE(NOW()), DATE(dateopened)) AS num_daysopen,
(28 - num_daysopen) as days_left
FROM table