I have a date(‘d/m/y’) date added to a MySQL database & then gotten & displayed on a page. How do I get the same date from the MySQL database (displayed as dd/mm/YY) & add 1 month.
@NogDogOct 25.2009 — #You could add it as another field to select from your query: <i> </i>SELECT <span><code>date_col</code></span>, <span><code>date_col</code></span> + INTERVAL 1 MONTH AS <span><code>next_month</code></span> FROM . . .
Alternatively, if you've converted the query result into a UNIX timestamp integer in your code: [code=php] $nextMonth = strtotime('+1 month', $timestampValueFromDB); [/code]
@mattwidgeauthorOct 27.2009 — #I've found a way that instead of displaying a month from a certain date, it shows the last day of the month instead. This suits my needs fine.