Hi all,
Hope all of you're doing good.
I have attatched herewith 'Patch.rar' file that contains the 'pma-finalpatch.diff ' file. There is an 'images' folder also within the 'Patch.rar' file, that contains the images that you would need to place at './themes/original/img' path.
My code will surely work well for tables having one primary key, but I still need to make improvements in it to handle 'more than 1 primary key' or 'no primary key' scenarios in the coming days.
I have also added a folder 'schemas' within 'Patch.rar' file, that contains the schemas of the target and source databases, that I have been testing my code on. Its just to clearify the approach that I have used.
Best regards, Zahra.
Hi
You can see this code live on our demo server: http://demo.phpmyadmin.net/gsoc-zahra/
Please note that messages are present only in English language for now.
Hi
Dne Fri, 10 Jul 2009 17:33:36 +0500 Zahra Naeem xara.fast@gmail.com napsal(a):
I have attatched herewith 'Patch.rar' file that contains the 'pma-finalpatch.diff ' file.
Quick review:
- Please do not choose generic file names for specific library (functions.php) and place libraries to libraries folder - Why the main script is called copy_of_server_sync.php?
Usage:
I tried to synchronise two databases on demo server (world and some empty database), what I got:
Warning in ./libraries/dbi/mysqli.dbi.lib.php#537 mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given
Backtrace
./libraries/dbi/mysqli.dbi.lib.php#537: mysqli_num_fields(boolean 1) ./libraries/database_interface.lib.php#1156: PMA_DBI_num_fields(boolean 1) ./functions.php#294: PMA_DBI_fetch_result( string INSERT INTO `wordpress`.`CountryLanguage` VALUES('USA','Portuguese','F','0.2');, NULL, NULL, object, ) ./copy_of_server_sync.php#276: PMA_createTargetTables( string world, string wordpress, object, object, string CountryLanguage, )
Warning in ./libraries/dbi/mysqli.dbi.lib.php#233 mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given
Backtrace
./libraries/dbi/mysqli.dbi.lib.php#233: mysqli_fetch_array( boolean 1, integer 1, ) ./libraries/database_interface.lib.php#1167: PMA_DBI_fetch_assoc(boolean 1) ./functions.php#294: PMA_DBI_fetch_result( string INSERT INTO `wordpress`.`CountryLanguage` VALUES('USA','Portuguese','F','0.2');, NULL, NULL, object, ) ./copy_of_server_sync.php#276: PMA_createTargetTables( string world, string wordpress, object, object, string CountryLanguage, )
For synchronising menagerie database with empty one, I ended up with:
Notice in ./functions.php#269 Undefined offset: 0
Backtrace
./copy_of_server_sync.php#276: PMA_createTargetTables( string menagerie, string blog, object, object, string pet, )
Zahra Naeem a écrit :
Hi all,
Hope all of you're doing good.
I have attatched herewith 'Patch.rar' file that contains the 'pma-finalpatch.diff ' file. There is an 'images' folder also within the 'Patch.rar' file, that contains the images that you would need to place at './themes/original/img' path.
My code will surely work well for tables having one primary key, but I still need to make improvements in it to handle 'more than 1 primary key' or 'no primary key' scenarios in the coming days.
I have also added a folder 'schemas' within 'Patch.rar' file, that contains the schemas of the target and source databases, that I have been testing my code on. Its just to clearify the approach that I have used.
Best regards, Zahra.
Hi Zahra, on the demo server I take the world database, copy it to world_marc then modify one row in one table of the world database. Then trying to synchronize world to world_marc, I get:
Notice in ./copy_of_server_sync.php#161 Undefined offset: 0
Notice in ./copy_of_server_sync.php#154 Undefined offset: 1
Notice in ./copy_of_server_sync.php#153 Undefined offset: 2
Notice in ./copy_of_server_sync.php#154 Undefined offset: 2
Notice in ./copy_of_server_sync.php#161 Undefined offset: 2
====== Then I click the green D, one line of changes appear, I tick it and click "apply selected changes", nothing happens. Then I try "Synchronize" and I get many warnings. Fortunately, the change has been synchronized.
P.S. did you read my previous comments in the devel list about the green D "button"?