0

I would like to know a way to create a copy of a template database for each user when they register. Basically I have an items template database and when a user registers online, a table will be created like userItems that is a direct copy of the items table. I need to be able to do this in php or any way that can be done using a php register page. I was attempting to use CREATE TABLE x LIKE y command but for some reason this doesn't work, and it seems ineffective to then loop through y and put the contents into x.

Sunderam Dubey
  • 1
  • 11
  • 20
  • 40
  • Are you certain that this problem cannot be solved by creating a new record in a kind of meta-table? Creating a table per user that signs up is a lot of overhead. – StockB Dec 09 '16 at 16:56

1 Answers1

2

That seems to be the same problem like the author of this question had: Duplicating a MySQL table, indexes and data

(I'm missing the necessary reputation otherwise I would have commented the question)

Community
  • 1
  • 1
xourscode
  • 89
  • 4