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 (4 years ago) RSS 2.0 feedNot enough user ratingsTotal: 414 This week: 1All time: 6,292 This week: 386Up
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
  Performance   Level  
Name: Jacob Fogg <contact>
Classes: 7 packages by
Country: United States United States
Age: 39
All time rank: 1201155 in United States United States
Week rank: 186 Up19 in United States United States Up
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:414
This week:1
All time:6,292
This week:386Up