msaz87 Posted July 24, 2010 Share Posted July 24, 2010 Hey all, I have a site where when a client signs up, it will create a unique MySQL DB for them using a template design I've created. What I'm wondering is what the best way to automate this process might be and whether there's a simple coding process to essentially say copy DBexample's structure with no data into NewClientDB? I can think of a few ways to get this accomplished but none too efficient and any that might make it simple for changing the template later on. Hopefully that makes sense -- any advice is greatly appreciated. Thanks! Link to comment https://forums.phpfreaks.com/topic/208739-best-way-to-copy-mysql-db-structure-from-template-upon-new-sign-up/ Share on other sites More sharing options...
Pikachu2000 Posted July 24, 2010 Share Posted July 24, 2010 Store the creation query string in the admin DB, with a variable for the table name. Then just run the query to create the table with the IF NOT EXISTS parameter to make sure the table name isn't duplicated, or by using some other unique value as the table name. Link to comment https://forums.phpfreaks.com/topic/208739-best-way-to-copy-mysql-db-structure-from-template-upon-new-sign-up/#findComment-1090521 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.