PHP Classes
elePHPant
Icontem

PHP Database Sync: Synchronize tables of different databases with PDO

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2014-11-17 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 320 This week: 1All time: 6,845 This week: 1,047Up
Version License PHP version Categories
db-sync 1.0.0GNU General Publi...5.4PHP 5, Databases, Systems administration
Description Author

This class can Synchronize tables of different databases with PDO.

It can connect to two different databases given to PDO objects queries a given table of the source database to insert its records on the destination database table of the same name.

The class can truncate the destination table to make a complete copy of the origin table, or delete rows first before inserting the updated rows based on its primary key.

Recommendations

Recommendation for a PHP class to sync database
sync database beetween local machine and server

Innovation Award
PHP Programming Innovation award nominee
November 2014
Number 5


Prize: One downloadable copy of Komodo IDE
Database synchronization is a process sometimes used by applications replicate data in databases.

When you are using databases of the same type, database synchronization is often a matter querying the origin database and inserting database records in the destination database.

However, if you need to use databases of different types, some field data type conversion may be necessary.

This class provides a solution to synchronize tables between different databases. It uses PDO to access each database, so it can avoid the need to convert data types.

Manuel Lemos
Picture of Jacob Fogg
  Performance   Level  
Name: Jacob Fogg <contact>
Classes: 7 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

  Files folder image Files  
File Role Description
Files folder imageFogg (1 directory)

  Files folder image Files  /  Fogg  
File Role Description
Files folder imageDb (1 directory)

  Files folder image Files  /  Fogg  /  Db  
File Role Description
Files folder imageSync (2 files)

  Files folder image Files  /  Fogg  /  Db  /  Sync  
File Role Description
  Accessible without login Plain text file example.php Example An example file
  Plain text file Sync.php Class The main class file

 Version Control Unique User Downloads Download Rankings  
 0%
Total:320
This week:1
All time:6,845
This week:1,047Up