MySQL offers pretty useful functions when you want to manipulate days:

  • You can add a time interval to a date value with ADDDATE() or DATE_ADD()
  • You can subtract a time interval from a date value witf DATE_SUB()
  • You can find the interval between two dates with  DATEDIFF()

It's often easier to compute this stuff directly in MySQL rather than in PHP.

For all date functions see the MySQL Manual.