469,898 Members | 2,361 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

will you please help me

11
hi
i`m quite new in mysql programming.i have a problem:
when i try to insert a row in a table i get an error 'Duplicate entry '' for key 1'
what does that mean? my indexes are unique and i don`t think they have any problem .
would you please tell me where`s my error
here is the troublesome line:
$query="INSERT INTO personalinfo ( nationalnum , accountnum)
VALUES ('$national', '$account')";


thanx a lot in adv
Aug 29 '06 #1
3 1102
vssp
268 100+
This error will occur same name will try enter second time
I think some fileds are set as unique or primeri key your table .

and another reson

Your variable passing the same value multiple time so chek ur valriable values every time insert new value
Aug 29 '06 #2
saeedeh
11
This error will occur same name will try enter second time
I think some fileds are set as unique or primeri key your table .

and another reson

Your variable passing the same value multiple time so chek ur valriable values every time insert new value

thanx a lot .yes it was the problem
Sep 2 '06 #3
vssp
268 100+
Thanks welcome
Sep 2 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

7 posts views Thread by John | last post: by
reply views Thread by palomine1234 | last post: by
5 posts views Thread by Hasin Hayder | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.