|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31639 mysql error code constant not defined
Submitted: 2005-01-21 16:17 UTC Modified: 2005-01-21 20:34 UTC
From: mnemo at minimum dot se Assigned:
Status: Not a bug Package: MySQL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: mnemo at minimum dot se
New email:
PHP Version: OS:


 [2005-01-21 16:17 UTC] mnemo at minimum dot se
the constant CR_CONNECTION_ERROR is not defined.

this works:
if (mysql_errno() == 2002) { blah }

but this does not:
if (mysql_errno() == CR_CONNECTION_ERROR) { blah }



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-21 17:36 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

PHP doesn't use and support mysql's internal error 
 [2005-01-21 20:34 UTC] mnemo at minimum dot se
Aha I understand, sry for the confusion.

From this page (see below) there is a "see also" link which points to those constants.

I realize now that the link goes to the MySQL site however I did not realize this when I first met this problem.

Maybe a little note can be added besides this link, something like:

"Note: Make sure you use the actual error code integers not the constants because the constants listed in this document is not defined in PHP's MySQL-library."
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 14:01:32 2024 UTC