mysqli_connect_errno(3) php man page | unix.com

Man Page: mysqli_connect_errno

Operating Environment: php

Section: 3

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)
Related Man Pages
mysqli_connect_error(3) - php
mysqli_errno(3) - php
mysqli_kill(3) - php
mysqli_ping(3) - php
mysqli_sqlstate(3) - php
Similar Topics in the Unix Linux Community
Dolda Connect 1.2 (Default branch)
Dolda Connect 1.3 (Default branch)
Cannot find localhost
Find and replace in multiple files
Transistion to php mysqli