[PHP] Handling MySQL errors

2004-07-03 Thread Shaun
Hi, Is there a way to handle MySQL errors gracefully such as a duplicate entry into a UNIQUE field, the method I've been using seems a little laborious... //see if user exists $query = SELECT * FROM users WHERE Username = '.$_POST[username].'; $result = @mysql_query($query);

Re: [PHP] Handling MySQL errors

2004-07-03 Thread John W. Holmes
Shaun wrote: Is there a way to handle MySQL errors gracefully such as a duplicate entry into a UNIQUE field, the method I've been using seems a little laborious... //see if user exists $query = SELECT * FROM users WHERE Username = '.$_POST[username].'; $result =