Wednesday, January 25, 2012

New Entry in database

While I was busy testing my website, I have realized that I don't have a "unique" key. Therefore, I need something that will separate each user by user.  Thus, I have added a "displayname" field in my database. This field has to be different for every user so the web server knows which user to log in. In other words, if the user logs in with its firstname and password, there may be duplicate entries in the database. Therefore it will not be able to process the user's login because there are more than one entries. Although we may use the "limit 1" MySQL statement, the user may be logged in with the wrong account details which may be false if the user views his/her profile and thus leading to infinite MySQL warnings.  

No comments:

Post a Comment