472,126 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

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 1140
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.