(PECL maxdb >= 1.0)
maxdb_stat -- maxdb->stat — Gets the current system status
Procedural style:
Object oriented style (method):
maxdb_stat() returns a string containing several information about the MaxDB server running.
A string describing the server status. FALSE if an error occurred.
Пример #1 Object oriented style
<?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();
?>
Пример #2 Procedural style
<?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);
?>
Результатом выполнения данного примера будет что-то подобное:
System status: Kernel 7<...>