cvs: phpdoc-de /reference/mysql/functions mysql-stat.xml

From: Date: Mon, 11 Nov 2002 16:20:28 +0000
Subject: cvs: phpdoc-de /reference/mysql/functions mysql-stat.xml
Groups: php.doc.de 
Request: Send a blank email to doc-de+get-334@lists.php.net to get a copy of this message
betz Mon Nov 11 11:20:28 2002 EDT Modified files: /phpdoc-de/reference/mysql/functions mysql-stat.xml Log: update Index: phpdoc-de/reference/mysql/functions/mysql-stat.xml diff -u phpdoc-de/reference/mysql/functions/mysql-stat.xml:1.5 phpdoc-de/reference/mysql/functions/mysql-stat.xml:1.6 --- phpdoc-de/reference/mysql/functions/mysql-stat.xml:1.5 Sat Jul 20 07:21:31 2002 +++ phpdoc-de/reference/mysql/functions/mysql-stat.xml Mon Nov 11 11:20:28 2002 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.3 Maintainer: betz Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.4 Maintainer: betz Status: ready --> <refentry id="function.mysql-stat"> <refnamediv> @@ -19,7 +19,7 @@ <note> <para> <function>mysql_stat</function> liefert nur die Werte uptime, - threads, queries, open tables, flush tables und queries/sec. Für eine + threads, queries, open tables, flush tables und queries pro sec. Für eine komplette Liste der anderen Statusvariablen sollte der SQL-Befehl SHOW STATUS verwendet werden. </para> @@ -29,16 +29,28 @@ <title><function>mysql_stat</function> Beispiel</title> <programlisting role="php"> <![CDATA[ -$link = mysql_connect("localhost", "mysql_user", "mysql_password"); -printf("%s\n", mysql_stat($link)); +<?php +$link = mysql_connect('localhost', "mysql_user", "mysql_password"); +$status = explode(' ',mysql_stat($link)); +print_r($status); +?> ]]> </programlisting> <para> Das oben gezeigte Beispiel liefert die folgende Ausgabe: <screen> <![CDATA[ -Uptime: 5380 Threads: 1 Questions: 1321299 Slow queries: 1 Opens: 26 Flush tables: 1 Open tables: 17 Queries per second avg: 245.595 - +Array +( + [0] => Uptime: 5380 + [1] => Threads: 2 + [2] => Questions: 1321299 + [3] => Slow queries: 0 + [4] => Opens: 26 + [5] => Flush tables: 1 + [6] => Open tables: 17 + [7] => Queries per second avg: 245.595 +) ]]> </screen> </para>

« previous php.doc.de (#334) next »