Jump to content

unique id


asmith

Recommended Posts

i want to make each table name i made by php automaticlly :

 

for example when i get username, password, ... from user,  instead of storing the in a table ROW, i create a TABLE for each user,

so for this, i need uniqe table names , like  user1, user2 , user 3 .

 

can make the table names auto_increment ?

i did once by php , i counted the rows of database results, and added 1 to the count result, then made that a table name ,

but my problem is , when i delete a table from database, so the rows that was counted become 1 less. so the next table name will be the same as the last .

 

how can i solve this ? (or do we have a special mysql command for table name auto_increment ? )

Link to comment
https://forums.phpfreaks.com/topic/79549-unique-id/
Share on other sites

Why would you want to? I think you need to reconsider your approach. This is not how a database is designed to work.

 

To take but one example. What happens when you want to gather information about many different users? You'd have to perform lots of separate queries and UNION the results. That would be VERY slow.

Link to comment
https://forums.phpfreaks.com/topic/79549-unique-id/#findComment-402891
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.