Jump to content

Recommended Posts

Hi...

 

I have form of uploading data to the database, but I need to delete data after 1 month. how does it possibe.

 

here is my query of insert data to the database:

 

$sql = "INSERT INTO sales_order (ProductType,WorkOrder,POIssueDate,SalesMonth) 
      VALUES 
      ('$ProductType','$WorkOrder','$POIssueDate','$SalesMonth')
      ON DUPLICATE KEY UPDATE
      ProductType = '$ProductType', WorkOrder = '$WorkOrder', POIssueDate = '$POIssueDate', SalesMonth = '$SalesMonth'" or die(mysql_error());
      mysql_query($sql, $con);

 

Should I need to add fields for date upload?

 

Thank you

Link to comment
https://forums.phpfreaks.com/topic/260849-delete-data-after-1-month/
Share on other sites

It's highly irregular to actualy delete information from a database that relates to any commercial process.  Especialy after only 1 month.  Common practice is to archive it after either a year or a quarter, depending on the environment. 

 

Your sure you want to delete?

Guest
This topic is now 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.