betz Fri Oct 25 08:35:17 2002 EDT
Modified files:
/phpdoc/en/reference/mysql/functions mysql-stat.xml
Log:
example "fix"
just to avoid the "ugly" layout at php.net/myslq_stat
Index: phpdoc/en/reference/mysql/functions/mysql-stat.xml
diff -u phpdoc/en/reference/mysql/functions/mysql-stat.xml:1.3
phpdoc/en/reference/mysql/functions/mysql-stat.xml:1.4
--- phpdoc/en/reference/mysql/functions/mysql-stat.xml:1.3 Fri Jun 21 08:50:59
2002
+++ phpdoc/en/reference/mysql/functions/mysql-stat.xml Fri Oct 25 08:35:17 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/mysql.xml, last change in rev 1.62 -->
<refentry id="function.mysql-stat">
<refnamediv>
@@ -30,7 +30,8 @@
<![CDATA[
<?php
$link = mysql_connect('localhost', "mysql_user", "mysql_password");
-printf("%s\n", mysql_stat($link));
+$status = explode(' ',mysql_stat($link));
+print_r($status);
?>
]]>
</programlisting>
@@ -38,8 +39,17 @@
The above example would produce the following output:
<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>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php