I'm trying to compare the structure of two mysql tables using php to determine if there are differences in the structures and then output where there are differences. I heard that there is a diff function, but I don't know how to access that via php. Can anyone provide guidance or code samples to help?
Thank you.
php to compare structure of mysql tables
Moderator: General Moderators
Re: php to compare structure of mysql tables
Essentially you would want to load the details of each table into an array and iterate through them or use PHPs built in array diff functions.
It sounds like you ought to have the secondary server setup as a slave server though, updated by the master automatically.
It sounds like you ought to have the secondary server setup as a slave server though, updated by the master automatically.