Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Q: error numbers and mysql versions
- Malcolm Dew-Jones
May 24, 2005, 8:11 pm
rate this thread
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
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
Feedback welcome, thanks.
This space not for rent.
Re: Q: error numbers and mysql versions
Malcolm Dew-Jones wrote:
SQLSTATE values are defined by the SQL standard, so perhaps that's most
likely to remain constant. SQLSTATE is supported in MySQL 4.1 and later.
Does this help?
- » Pre-approved Application #922271E Wed, 25 May 2005 06:57:10 -0800
- — Next thread in » MySQL Database Forum
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum