0

I am having multiple tables with same structure and a template table which is the master for all of these tables.

Is there a way that whenever i make any changes to master table(in structure), The child tables should get updated to always keep the structure same as of the master template table.

I am using php and mysql for this operation.

For startup i am using queries like

SHOW TABLE STATUS FROM 'test%'

and then i want help for comparing table columns

and then if a column is missing in child table then i can create that column.

4
  • If you're determined to use such a schema, couldn't you use triggers to update the child tables on master changes? Commented Dec 20, 2013 at 12:25
  • Using PHPMyAdmin stackoverflow.com/questions/2554903/… Commented Dec 20, 2013 at 12:28
  • @ChrisW The triggers will work for structures also??? Commented Dec 20, 2013 at 12:41
  • @EisaAdil I saw the method but unfortunately i am using myisam engine. Commented Dec 20, 2013 at 12:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.