mysqli->connect_errno
mysqli::__construct
MySQLi
PHP Manual

# mysqli->connect_error

# mysqli_connect_error

(PHP 5)

mysqli->connect_error -- mysqli_connect_error — Returns a string description of the last connect error

### Beschreibung

mysqli
string $connect_error;
string mysqli_connect_error ( void )

Returns the last error message string from the last call to mysqli_connect().

### Rückgabewerte

A string that describes the error. An empty string if no error occurred.

### Beispiele

Beispiel #1 mysqli_connect_error() example

`<?php
$link = @mysqli_connect("localhost", "nonexisting_user", "");
if (!$link) {
printf("Can't connect to localhost. Error: %s\n", mysqli_connect_error());
}
?>`

### Siehe auch

- mysqli_connect()
- mysqli_connect_errno()
- mysqli_errno()
- mysqli_error()
- mysqli_sqlstate()

mysqli->connect_errno
mysqli::__construct
MySQLi
PHP Manual