I need a php script that can be used to update many table structures in a single mysql database simultaneously.
The format of the function should be something like:
$dbinfo will be an array with all the connection & database info
$suffix will be a common string to search for at the end of the table names (e.g. if my tables are named client1_stuf,client2_stuff etc, I want to set $suffix to "_stuff" to operate on all tablenames ending in _stuff.
$process will be whatever changes need to be made to each table. The format of $process I'm not sure of, perhaps you could offer some suggestions, I assume it could be a SQL statement. However, in the end I want to be able to:
- Add new fields with the correct formats
- Delete a field
- Change the format of a field
Should a table have been manually changed, the function will simply skip that table without returning an error.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Complete ownership and distribution copyrights to all work purchased.