Sedang Disiapkan

220434 BISAPI - Compare MySQL DB

We need a PHP application written to compare any two identical MySQL databases.

1. The application will be a PHP script that receives 4 variables: DB1, Table_Name_DB1, DB2, Table_Name_DB2.

2. The script will first check if DB1, Table_Name_DB1, DB2 and Table_Name_DB2 exist. If any of the databases or tables don't exist, then return "NOT_EXIST variable_name" and end process. Else proceed to the next step.

3. Compare the primary key field of Table_Name_DB1 and Table_Name_DB2 from the first field to the last. There will be no field headers, so you can start from the first row.

4. If EXIST row in Table_Name_DB2 but NOT EXIST in Table_Name_DB1, then DELETE ROW from Table_Name_DB2 with their corresponding related tables. You can see from this action that Table_Name_DB1 takes precedence over Table_Name_DB2.

5. If NOT EXIST row in Table_Name_DB2, but EXIST row in Table_Name_DB1, then INSERT ROW in Table_Name_DB2 with the same row values from Table_Name_DB1 and their corresponding related tables. You can see also from this action that Table_Name_DB1 takes precedence over Table_Name_DB2.

6. At this point, the number of rows in both tables should be identical, and the primary key fields in both tables should also be identical. COMPARE the date values of the field "LAST_EDIT_DATE" in both tables.

7. For each row, If "LAST_EDIT_DATE" in Table_Name_DB2 is LATER THAN in Table_Name_DB1, return "Please check data for accuracy." and exit process.

8. For each row, if "LAST_EDIT_DATE" in Table_Name_DB1 is LATER THAN in Table_Name_DB2, then replace all non-null values in all fields from Table_Name_DB1 to Table_Name_DB2. Please also replace the values from the rows of the other 3 related tables.

9. For each row, if "LAST_EDIT_DATE" is the same for both tables, ignore the row.

10. When all the rows have been compared, return "SUCCESS", report the number of rows changed and the values, then exit the process.

Thanks for your interest in this project. I hope that the description is clear enough for you to submit a competitive bid. Please post any questions you might have in the PMB. I'll respond to them as quickly as I can to help you with your bidding process.

Thanks and regards,

Jin

Manager, BISWebTeam.

Kemahiran: Semua Boleh, MySQL, PHP

Lihat lebih lanjut: php script null, Mysql questions, mysql db, mysql 5.1, mysql report, jin, jin jin, compare exist, rows insert, mysql delete, mysql else insert, php delete mysql row, data compare, delete mysql tables, application will ignore, mysql date field, insert related, mysql delete tables, mysql check, mysql tables rows, check compare, script delete row php, mysql exist, mysql replace script, bidding application php mysql

Tentang Majikan:
( 52 ulasan )

ID Projek: #1966667