Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Get Some Basic Information Back from MySQL Servers
How To Get Some Basic Information Back from MySQL Servers? - MySQL FAQs - PHP Connections and Query Execution
✍: FYIcenter.com
Once you got a MySQL server connection object successfully, you can use mysql_get_server() and mysql_get_host_info() to get some basic information from your MySQL server. The tutorial exercise below is a good example:
<?php
$con = mysql_connect('localhost:8888', 'dev', 'iyf');
if (!$con) {
print("There is a problem with MySQL connection.\n");
} else {
print("The MySQL connection object is ready.\n");
print(mysql_get_client_info()."\n");
print(mysql_get_server_info($con)."\n");
print(mysql_get_host_info($con)."\n");
mysql_close($con);
}
?>
If you run this script, you will get something like this:
The MySQL connection object is ready. 4.1.7 5.0.24-community-log localhost via TCP/IP
2007-05-10, 5585👍, 0💬
Popular Posts:
What Is the Difference between Formal Parameters and Actual Parameters? - Oracle DBA FAQ - Creating ...
An application needs to load a library before it starts to run, how to code? One option is to use a ...
What will be printed as the result of the operation below: main() { int x=20,y=35; x=y++ + x++; y= +...
What Is the Data Pump Import Utility? - Oracle DBA FAQ - Loading and Exporting Data Oracle Data Pump...
Can you explain what is “AutoPostBack” feature in ASP.NET ? If we want the control to automatically ...