Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Mysql Duplicate Keys |
|
Author |
|
Dingbat
Joined: 18 Apr 2010 Posts: 2
|
Posted: Sun 18 Apr '10 10:28 Post subject: Mysql Duplicate Keys |
|
|
Hi Guys,
Can any of you experts please help. I have a table with the email field set unique. If a user tries to insert the same email they get the following: Error: Duplicate entry..for key 'email'.
This is good to a point, but can any person explain how I can amend that error mesage?
Dingbat |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sun 18 Apr '10 20:59 Post subject: |
|
|
I would make a SELECT to the table with the "new" email address. If there is a result you can define your own error message. Else insert the new email address. |
|
Back to top |
|
|
|
|
|
|