Q:

How to query date and add 3 day in the result?

I have the follow query who allow me to get the expiration date of plan subscription of my site:
SELECT DATE_FORMAT( `expiry_date`, '%d %m %Y' )
FROM `plan_cbsubs_subscriptions` 
WHERE `user_id` = '[user_id]'

So if the plan subscription end the next 27 July, the above query return "27 07 2013". Now my goal is to modify this query for add 3 more day for finally return "30 07 2013" even if the real value is well "27 07 2013".
I suppose is possible to add in the query +3 somewhere, but I don't know the correct syntax.

A:

Something like this should work:
SELECT DATE_FORMAT(DATE_ADD(`expiry_date`,INTERVAL 3 DAY), '%d %m %Y' )
FROM `plan_cbsubs_subscriptions` 
WHERE `user_id` = '[user_id]';

to subtract 3 days:
SELECT DATE_FORMAT(DATE_SUB(`expiry_date`,INTERVAL 3 DAY), '%d %m %Y')
FROM `plan_cbsubs_subscriptions`
WHERE `user_id` = '[user_id]';

you can find more information here: MySQL DateAdd

