F.24. MySQL

FunctionReturnsDescription
mysql_connect([string hostname[:port][:/path/to/socket] [, string username [, string password [, bool new [, int flags]]]]])
resourceOpens a connection to a MySQL Server.
mysql_pconnect([string hostname[:port][:/path/to/socket] [, string username [, string password [, int flags]]]])
resourceOpens a persistent connection to a MySQL Server.
mysql_close([int link_identifier])
boolCloses a MySQL connection.
mysql_select_db(string database_name [, int link_identifier])
boolSelects a MySQL database.
mysql_get_client_info(void)
stringReturns a string that represents the client library version.
mysql_get_host_info([int link_identifier])
stringReturns a string describing the type of connection in use, including the server host name.
mysql_get_proto_info([int link_identifier])
intReturns the protocol version used by current connection.
mysql_get_server_info([int link_identifier])
stringReturns a string that represents the server version number.
mysql_info([int link_identifier])
stringReturns a string containing information about the most recent query.
mysql_thread_id([int link_identifier])
intReturns the thread id of current connection.
mysql_stat([int link_identifier])
stringReturns a string containing status information.
mysql_client_encoding([int link_identifier])
stringReturns the default character set for the current connection.
mysql_create_db(string database_name [, int link_identifier])
boolCreates a MySQL database.
mysql_drop_db(string database_name ...

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.