Hello
I need to detect duplicate errors when using mysql to insert a row in a
php program. (I assume that the php version should not make a difference,
but I don't know that for sure, which is why I mention php.)
I am using mysql_error() and mysql_errno() - no problem there, but my
question concerns the values they return in different versions of mysql.
With my versions the errno is 1062, and the error string contains the word
"duplicate".
But what will they return if the versions should change?
What is the most reliable way to detect the duplicate error that will
still work if the versions change?
Will the errno remain constant for different versions of mysql?
If not, then what is the best way to handle this, is there a library of
error constants?
Feedback welcome, thanks.
--
This space not for rent.