Page 1 of 1

Hide duplicate entry error?

Posted: Mon Mar 26, 2007 5:50 am
by SmokyBarnable
I made a field unique to prevent duplicate rows when inserting. This works fine the only problem is it outputs an error on the web page for everyone to see. Is there a way to supress this error?

1062 - Duplicate entry '34025334007' for key 2
(here is shows the insert into query)
[TEP STOP]

Posted: Mon Mar 26, 2007 6:08 am
by kaszu
I think you can prevent outputting by using @mysql_query

Posted: Mon Mar 26, 2007 6:14 am
by timvw
The error message is only shown, when your code says it should show the error... So, show us your code ;)

(Probably a die(mysql_error()) or something alike)