[PHP] Re: [PHP-WIN] RE: [PHP] How to Show my Own Error Message Instead of Mysql Error?

2002-06-21 Thread Chris Boget
> i made a Registration Form for user to input their Data, but i also had some > Field Check before the data can be insert to the Mysql_Database! > I had a question here, sometime the mysql shows the error : > "Duplicate Key for xxx" > I know what is this about, reguarding to my Registration Form,

RE: [PHP] How to Show my Own Error Message Instead of Mysql Error?

2002-06-20 Thread Martin Towell
what about doing a "select count(*) from table where username = 'foobar'" then, if ($cnt > 0) { /* display error */ } else { /* insert new username */ } -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: Friday, June 21, 2002 2:07 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [