What function/ code to use to count back X number of days spanning months

They have: 1 posts

Joined: Aug 2009

Hi All,

I'm fairly new to PHP and really do than you in advance for any hints as to come up with a solution to these problems.

Using PHP and a MySql database.

Problem 1:

I need to come up with a way of counting back 365 number days and during that period count the number of times a specific product was purchased.

Problem 2:

Product expiry. I need to calculate the first day of the fourteenth whole month after a product was purchased..... real head scratcher.

Thanks a ton in advance.