I'm pulling a date value (not a datetime value) from a MySQL database, but I need to subtract 30 days from that date, and not sure how to do it. I found a sample using mktime() to break up the day-month-year and subtracting 30 days from the 'day' component, but the result is all wacky. Any help would be appreciated.

Nevermind. I think I got it.

in php just use strtotime():

echo date('Y-m-d', strtotime("now -30 days") );

In your case INSTEAD of now you would use whatever date you have.