PHP » GoLang |
login |
register |
about
|
GoLang mysqli::__construct
request it (419)
GoLang replacement for PHP's mysqli::__construct
[edit | history]
mysqli::__constructmysqli::connectmysqli_connect(PHP 5, PHP 7) mysqli::__construct -- mysqli::connect -- mysqli_connect — Open 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")
]]]]]] )
void 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")
]]]]]] )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. 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
|
more
Recently updated
more
Most requested
more
Last requests
|