PHP Classes

Keep edit and delete database archive: Access tables keeping deleted records archived

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2012-12-16 (2 years ago) RSS 2.0 feedNot enough user ratingsTotal: 552 All time: 5,066 This week: 1,392Up
Version License PHP version Categories  
archive-edit-delete 1.0GNU General Publi...5.0PHP 5, Databases
Description Author  

This class can access MySQL tables keeping deleted records archived.

It can execute common queries to manipulate records of a MySQL table but record deletion is emulated by setting a field with the data of the soft-deletion of the record.

The class can execute SQL INSERT, UPDATE, DELETE and SELECT queries ignoring rows there are soft-deleted.

Innovation Award  
PHP Programming Innovation award winner
January 2013
Permanently deleting database records may be a dangerous operation to execute from an application.

If a Web site that performs record deletion has its user accounts compromised, the attacker may cause irreversible damage by executing operations that delete important information records.

A more secure alternative is to implement what is called soft-deletion of records.

In practice this means that records are not really deleted. Instead they have a field that is used to mark deleted records.

This way, if there is a security breach and records are marked as deleted, the records that were affected may be undeleted.

This class implements access to MySQL database table records with soft-deletion support.

The delete operation just sets the field to mark the records as deleted. The table access operations ignore records marked as deleted.

Manuel Lemos
Picture of majid ramzani
Name: majid ramzani <contact>
Classes: 4 packages by
Country: Iran Iran
Age: 23
All time rank: 118911 in Iran Iran
Week rank: 1764 Down40 in Iran Iran Down
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file index.php Example usage
Plain text file KEDA.class.php Class class file
Accessible without login Plain text file news.sql Data table structure
Accessible without login Plain text file readme.txt Doc. read me

 Version Control Unique User Downloads Download Rankings  
 0%Total:552All time:5,066
 This week:0This week:1,392Up