Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mysqli_connect_errno(3) [php man page]

MYSQLI_CONNECT_ERRNO(3) 						 1						   MYSQLI_CONNECT_ERRNO(3)

mysqli::$connect_errno - Returns the error code from last connect call

       Object oriented style

SYNOPSIS
string$mysqli->connect_errno () DESCRIPTION
Procedural style int mysqli_connect_errno (void ) Returns the last error code number from the last call to mysqli_connect(3). Note Client error message numbers are listed in the MySQL errmsg.h header file, server error message numbers are listed in mysqld_error.h. In the MySQL source distribution you can find a complete list of error messages and error numbers in the file Docs/mysqld_error.txt. RETURN VALUES
An error code value for the last call to mysqli_connect(3), if it failed. zero means no error occurred. EXAMPLES
Example #1 $mysqli->connect_errno example Object oriented style <?php $mysqli = @new mysqli('localhost', 'fake_user', 'my_password', 'my_db'); if ($mysqli->connect_errno) { die('Connect Error: ' . $mysqli->connect_errno); } ?> Procedural style <?php $link = @mysqli_connect('localhost', 'fake_user', 'my_password', 'my_db'); if (!$link) { die('Connect Error: ' . mysqli_connect_errno()); } ?> The above examples will output: Connect Error: 1045 SEE ALSO
mysqli_connect(3), mysqli_connect_error(3), mysqli_errno(3), mysqli_error(3), mysqli_sqlstate(3). PHP Documentation Group MYSQLI_CONNECT_ERRNO(3)

Check Out this Related Man Page

MYSQLI.CONNECT_ERRNO(3) 						 1						   MYSQLI.CONNECT_ERRNO(3)

mysqli::$connect_errno - Returns the error code from last connect call

       Object oriented style

SYNOPSIS
int$mysqli->connect_errno () DESCRIPTION
Procedural style int mysqli_connect_errno (void ) Returns the last error code number from the last call to mysqli_connect(3). Note Client error message numbers are listed in the MySQL errmsg.h header file, server error message numbers are listed in mysqld_error.h. In the MySQL source distribution you can find a complete list of error messages and error numbers in the file Docs/mysqld_error.txt. RETURN VALUES
An error code value for the last call to mysqli_connect(3), if it failed. zero means no error occurred. EXAMPLES
Example #1 $mysqli->connect_errno example Object oriented style <?php $mysqli = @new mysqli('localhost', 'fake_user', 'my_password', 'my_db'); if ($mysqli->connect_errno) { die('Connect Error: ' . $mysqli->connect_errno); } ?> Procedural style <?php $link = @mysqli_connect('localhost', 'fake_user', 'my_password', 'my_db'); if (!$link) { die('Connect Error: ' . mysqli_connect_errno()); } ?> The above examples will output: Connect Error: 1045 SEE ALSO
mysqli_connect(3), mysqli_connect_error(3), mysqli_errno(3), mysqli_error(3), mysqli_sqlstate(3). PHP Documentation Group MYSQLI.CONNECT_ERRNO(3)
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Error message: What does it mean?

I get this error message in my maillog. Can someone tell me what it means? SYSERR(root): collect: I/O error on connection from mail-05.goomba.com I guess it means that the server could not connect to mail-06.goomba.com. Is my interpretation correct? Any idea why it happens? (1 Reply)
Discussion started by: mojoman
1 Replies

2. Programming

GMAKE error returns - What does that mean ?

I am using xmake which I guess calls gmake which ... whatever. I get an error in my compiling and want to know what the error number means. For example, the message might be "Error 139". Rather then post the exact code fragment and exact output, I want to find the a list of error codes and... (1 Reply)
Discussion started by: intcwrtr
1 Replies

3. Shell Programming and Scripting

Executing a command line in a directory and its subdirectories

I'm finally about to make the jump from PHP's mysql driver to the newer mysqli one using the mysqli converter tool. The tool is called by this command line: php /usr/share/nginx/html/rather/converter/cli.php -d -p ".php,.shtml,.inc" -u -b -v -w >> /tmp/convert.log e.g. at the web root:... (2 Replies)
Discussion started by: dheian
2 Replies

4. AIX

Error while instrumenting purify

when i instrument ourify i am getting error like .*** OI_init: Error, cannot connect to X server Purify or PureCoverage slave: Warning: Can't open display "localhost:0", using tty mode. . Got it] I am using AIX1.6 OS i have xwin32 installed in my windows.. (1 Reply)
Discussion started by: greenworld123
1 Replies

5. Shell Programming and Scripting

Cannot find localhost

I get a "not found" error from this localhost/choice.php ethan@meow:~$ ping 127.0.0.1 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.025 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.036 m and this ethan@meow:~$ mysql -u... (4 Replies)
Discussion started by: Meow613
4 Replies

6. Shell Programming and Scripting

Find and replace in multiple files

Hi, I have php files in main dir and sub dir's as well. I need to find "new mysqli('localhost', 'System', 'xxxxxx', 'System', '3306');" and replace as "new mysqli('localhost', 'unx_sys', 'yyyy', 'unx_sys', '3306');" I tried like: sed 's/new mysqli\(*\)\;$/new... (1 Reply)
Discussion started by: ashokvpp
1 Replies

7. Linux

Transistion to php mysqli

All, I'm using the Enterprise Modules Framework (Tomorrow's Framework) and the recent changes/upgrades to PHP7 require the use of mysqli_ commands over the old mysql_ commands. Here is the code from the connection section of the dataio module: function... (5 Replies)
Discussion started by: TBotNik
5 Replies