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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.