Jump to content

Simlpe question


Minase

Recommended Posts

hy there i am programing in php and sql for some time and till now i was thinking everything i was doing was good

here is a  simple question

i often work with register / login forms

i was thinking of asking you guys if my users table is designed correctly

from my point of view is good,is there any performance "leaks" in it's design? can i structure it in other way for faster results?

thank you

Table Users {
ID (int 20) primary key, auto increment,unique
Username (varchar 14), unique
E-mail(varchar 100), unique
E-mail2(varchar 100), unique
RegisterDate(int 10)
Status(smallint 1)
Lastvisit(int 10)
Idle(int 10)
}

 

Registerdate,lastvisit and Idle are unix timestamps ,status is the account status like 0 = unactivated ,1 activated,2suspended etc

//edit

was thinking about int limit at 2.47 billion is the value 20 too high?

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.