I'm trying to add an integer to a date but I get the following error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(wp.OrderDate, INTERVAL WPProduct.Duration DAY) AS ExpiryDate FROM wp' at line 6
SELECT
wp.customers_id,
wp.OrderDate,
wp.products_id,
WPProduct.Duration,
DATE_ADD (wp.OrderDate, INTERVAL WPProduct.Duration DAY) AS ExpiryDate
FROM wp
INNER JOIN WPProduct ON WPProduct.products_id = wp.products_id
WHERE wp.customers_id = 2