|
mysqli::__constructmysqli_connectOpen a new connection to the MySQL server DescriptionObject oriented style
mysqli::__construct
([ string
$host = ini_get("mysqli.default_host")
[, string $username = ini_get("mysqli.default_user")
[, string $passwd = ini_get("mysqli.default_pw")
[, string $dbname = ""
[, int $port = ini_get("mysqli.default_port")
[, string $socket = ini_get("mysqli.default_socket")
]]]]]] )Procedural style
mysqli mysqli_connect
([ string
$host = ini_get("mysqli.default_host")
[, string $username = ini_get("mysqli.default_user")
[, string $passwd = ini_get("mysqli.default_pw")
[, string $dbname = ""
[, int $port = ini_get("mysqli.default_port")
[, string $socket = ini_get("mysqli.default_socket")
]]]]]] )Opens a connection to the MySQL Server running on. Parameters
Return ValuesReturns an object which represents the connection to a MySQL Server. Changelog
ExamplesExample #1 mysqli::__construct example Object oriented style
<?php Object oriented style when extending mysqli class
<?php Procedural style
<?php The above examples will output: Success... MySQL host info: localhost via TCP/IP Notes
See Also
|