Hi, in my script I need to create a Table on-the-fly (alla, on the users demand). The thing is the user could potentially create thousands of these tables (btw, is there a maximum number of tables a database can hold in MySQL?).
The only two options I could think of where
1)Count the number of tables in the database add 1 to this, and create a table based of that number
2)Create a table that just keeps track of the number of dynamically generated tables, pull this value out and add 1 to it.
They both have there probelms though, for exampe in E.X. 1 if the users delated a table (Say table 8 out of 23), it would then count that there are only 22 tables, add one so it would have 23, and then try to create a table based off of this, but it would fail because that number as already been used.
They only problem I can see with #2 is it would be slow and add another query.
So, if anyone can think of a better option I would appreciate it greatly.
TIA, Bryce