PHP Classes

PHP MYSQL Undo Query: Log changes to tables to revert the changes later

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (9 months ago) RSS 2.0 feedStarStarStar 53%Total: 584 All time: 5,297 This week: 455Up
Version License PHP version Categories
mysql-undo 1.10GNU General Publi...5PHP 5, Databases
Collaborate with this project 

Author

MYSQLUndo - github.com

Description

This class can log changes to MySQL tables to revert the changes later.

It creates a log table that will record the changes done to a given table using triggers also created by the class.

The class can undo the changes done to the tables by looking up the log table.

It can revert the all the changes that were done since logging was enabled or just up to a given period of time.

Innovation Award
PHP Programming Innovation award nominee
December 2013
Number 2


Prize: One copy of the Zend Studio
Database transactions are useful to revert a set of changes done to the database records in case part of the operation fails due to an unexpected reason.

However, transactions are usually made of a set of changes done in a short period of time.

This class provides a solution to revert changes done to MySQL database table records eventually performed across multiple database transactions.

Manuel Lemos
Picture of Ovunc Tukenmez
  Performance   Level  
Name: Ovunc Tukenmez <contact>
Classes: 14 packages by
Country: Turkey Turkey
Age: 38
All time rank: 72011 in Turkey Turkey
Week rank: 206 Up5 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 6x

Details

MYSQLUndo ========= This PHP class is used to make possible to undo unwanted data changes in the MYSQL database. * Logging must be enabled for the table in order to track changes. * It class creates triggers to store current state of the inserted/updated/deleted row in the time of change. * Also a stored procedure for the table is created to make possible to get previous state of the rows before the specified time span defined with start_date and end_date parameters.

  Files folder image Files (4)  
File Role Description
Plain text file MYSQLUndo.php Class base class file.
Accessible without login Plain text file example.php Test examples
Accessible without login Plain text file LICENSE.md Data Auxiliary data
Accessible without login Plain text file README.md Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:584
This week:0
All time:5,297
This week:455Up
User Ratings User Comments (2)
 All time
Utility:81%StarStarStarStarStar
Consistency:81%StarStarStarStarStar
Documentation:-
Examples:-
Tests:50%StarStarStar
Videos:-
Overall:53%StarStarStar
Rank:2167
 
Very nice code
10 years ago (Rakesh Kumar)
70%StarStarStarStar
very nice work.
10 years ago (Ashok kumar kashyap)
70%StarStarStarStar