<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
  <refentry id="function.maxdb-stat">
   <refnamediv>
    <refname>maxdb_stat</refname>
    <refname>maxdb->stat</refname>
    <refpurpose>Gets the current system status</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <para>Procedural style:</para>
    <methodsynopsis>
     <type>string</type><methodname>maxdb_stat</methodname>
     <methodparam><type>resource</type><parameter>link</parameter></methodparam>
    </methodsynopsis>
    <para>Object oriented style (method):</para>
    <classsynopsis>
     <ooclass><classname>maxdb</classname></ooclass>
     <methodsynopsis>
      <type>string</type><methodname>maxdb->stat</methodname>
      <void />
     </methodsynopsis>
    </classsynopsis>
    <para>
     <function>maxdb_stat</function> returns a string containing several
     information about the MaxDB server running.
    </para>
   </refsect1>
   <refsect1>
    <title>Return values</title>
    <para>
     A string describing the server status. &false; if an error occurred.
    </para>
   </refsect1>
   <refsect1>
    <title>See also</title>
    <para>
     <function>maxdb_get_server_info</function>
    </para>
   </refsect1>
   <refsect1>
    <title>Example</title>
    <example>
     <title>Object oriented style</title>
     <programlisting role="php">
<![CDATA[
<?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();
?>
]]>
    </programlisting>
    </example>
    <example>
     <title>Procedural style</title>
     <programlisting role="php">
<![CDATA[
<?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);
?>
]]>
     </programlisting>
    </example>
    <para>
      The above examples would produce the following output:
    </para>
    <screen>
<![CDATA[
System status: Kernel    7<...>
]]>
    </screen>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->