Jump to content

Time


shage

Recommended Posts

In DB? Maybe something like:

 

<?php
//  testing 1 month..
$qry = "Update tbl set row_date=DATE_ADD(row_date, INTERVAL 1 MONTH) where PERIOD_DIFF(DATE_FORMAT(CURDATE(),"%Y%m"),DATE_FORMAT(row_date,"%Y%m")) >= 1 ";

// or testing 30 days .. 
$qry = "Update tbl set row_date=DATE_ADD(row_date, INTERVAL 1 MONTH) where DATEDIFF(CURDATE(),row_date) > 30";
?>

 

I could be wrong though.. usually am.  :D

Link to comment
https://forums.phpfreaks.com/topic/58170-time/#findComment-288586
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.