Javascript debugger
Website design
↑
Procedural style:
Object oriented style (method):
maxdb {
string maxdb->stat();
}
maxdb_stat() returns a string containing several information about the MaxDB server running.
<?php
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
printf ("System status: %s\n", $maxdb->stat());
$maxdb->close();
?>
<?php
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
printf("System status: %s\n", maxdb_stat($link));
maxdb_close($link);
?>
The above examples would produce the following output:
System status: Kernel 7<...>
maxdb_get_server_info() |