Hi,

I have an update statement that tries to update a number of values - these values have 
unique value constraint so when I do the update it will either succeed or fail. If it 
fails how can I determine where the update failed. i.e. pinpoint the value that was 
not unique?

At the moment I am doing ...

$sql = mysql_query("UPDATE dis_user SET first_name = '$firstName', last_name = 
'$lastName', email_address = '$emailAddress' WHERE user_id = '$userId'");

if(!$sql) {
    echo "Data not inserted due error";
}

How can I improve on the above to give specific error information.

Thanks

Matt

Reply via email to