|
-
Jan 1st, 2011, 06:50 PM
#1
Thread Starter
Addicted Member
Facing problem with primary keys
Using php i created a database called "my_db". Then i added a table called "users" kai 3 columns "username", "password", "email_address". The columns "username" and "email_address" are the primary keys. So they can accept only unique records. But this is what is happening...
username : george
email : [email protected]
(this combination is accepted - it's also the first row of records so there is no problem. lets continue adding one more).
username : george
email : [email protected]
(Duplicate entry '[email protected]' for key 1. Ok let's try another one)
username : george
email : george2@hotmail.com
(and it accepts it. so i have two users with exactly the same name. I also get the same result if i add a different name and a mail that already exists)
any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|