update mysql from a sql file

102 Views Asked by At

Im new to the php and mysql. I have been coding an auto update script. Everything works fine as I can download the latest version files from my own host which includes of the sql file of mysql. All I want to do an update due to this sql file.

What I want this code to do is;

  1. If there is new tables, add it to the mysql and if we have deleted 1 table it can check and delete the same table from mysql.

  2. But while we are doing this update, we will have so many entries under columns so I dont want it to update the columns which has entries in it. But if this is a column that we have deleted from the source sql file then it will delete it.

  3. If there is new column on the source sql file then it will add that column to the mysql.

Any possibility can help me? Try to find if I can find something similiar but I couldnt see. Thats why I opened a topic here.

Thank you very much

0

There are 0 best solutions below