Location: PHPKode > scripts > phpMyDBCompare > phpmydbcompare/example.php
<?
// ======================================================================================================================================================
	//  Author:     				Gustavo Arcila (tavoarcila at gmail dot com)
	//	Web: 	    				http://www.gurusistemas.com
	//	Name: 	    				example.php
	// 	Description:   				Example. How to use phpMyDBCompare Class.
	//	License:    	  			GNU General Public License (GPL)
	//  Release Date:               May 29th / 2006
	//  Last Update date: 			May 29th / 2006
	// 
	//  Comments: A very simple tool which will help php developers to compare if their Remote databases are the same as their local databases
	//
	//            Sometimes you made changes in your local database but forget to do in your Remote, even more if you use several databases
	//
	//	Features: 
	//					* Easy to use
	//					* Local and remote databases may have different names.
	//					* Local connection to database is made thru php MySQL native functions and Remote connection is made thru ODBC Drivers
	//
	//  Requirements:
	//					* MySQL ODBC Drivers For the remote database.
	//  Tested on:
	//					* php 4.4.2
	//
	//				
	//  If you make any modifications making it better, please let me know to tavoarcila at gmail dot com
	//
// =====================================================================================================================================================

include("phpMyDBCompare.inc.php");

$comp = new DBCompare();
$comp -> SelectLocalDatabase("databasename");
$comp -> SelectRemoteDatabase("databasename");            // Call this only If the remote database has a different name
$comp -> ConectaLocal("localhost","username","password");
$comp -> ConectaRemote("ip_to_remote_server","username","password");
$comp -> Compare();


?>
Return current item: phpMyDBCompare