hi friends,,,,
this is my table creation query,,,,
////
mysql_query("create table logg(fname varchar(20),lname varchar(20),pwd varchar(20),mnum varchar(20),hnum varchar(20),eid varchar(35),primary key(fname,eid))
////
i set fname and eid as primary key,,,, while i inserting already existing 'eid' it shows exception but when i am insert already existing 'fname' the executed suceddfully,,, i doesn't show exception,,, why
prob in primary key
Moderator: General Moderators
Re: prob in primary key
Exception is only if both fname and eid exists in the same record
example
fname | eid
abcde | 123
abcde | 234 - ok
bcdef | 123 - ok
abcde | 123 - exception
example
fname | eid
abcde | 123
abcde | 234 - ok
bcdef | 123 - ok
abcde | 123 - exception