SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist cms9651's Avatar
    Join Date
    Mar 2010
    Posts
    407
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Duplicate entry '10022438' for key 2

    Hello everyone, I need your help.

    I receive this error in mysql:
    [MySQL][ODBC 5.1 Driver][mysqld-5.0.45-community-nt-log]Duplicate entry '10022438' for key 2

    Because in my table the field `card` as index type `unique`.

    To many this error is incomprehensible: can be a way in mysql to explain this error at the time of registration (for example `this value already exists`)... or only it's possible with a language server-side?

    Regards.
    Thanks you very much for your help
    I'm really happy for your quickly answer.
    Good bye

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,341
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    you have to translate the mysql message into user-friendly words in your application, you cannot do it in mysql
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •