Auxiliary functions of php
Some auxiliary functions of php: mysql_client_encoding () mysql_get_server_info () mysql_get_host_info () mysql_get_client_info () mysql_stat () Example:
- $ Link = mysql_connect ("localhost", "root", "root") or die ("couldn't connect:". mysql_error ());
- Echo "character set name:". mysql_client_encoding ()."
";
- Echo "mysql server information:". mysql_get_server_info ()."
";
- Echo "mysql host information:". mysql_get_host_info ()."
";
- Echo "mysql client information:". mysql_get_client_info ()."
";
- Echo "current system status:". mysql_stat ()."
";
- Mysql_close ();
- ?>
Result: Character set name: latin1mysql server information: 5.1.34-communitymysql host information: localhost via TCP/IPmysql client information: 5.0.51a current system status: Uptime: 2539 Threads: 1 Questions: 17 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 1 Queries per second avg: 0.6 |