ID:               22005
 Comment by:       mike at pcmedx dot com
 Reported By:      haafiz at ezwebsolutions dot ca
 Status:           Open
 Bug Type:         Documentation problem
 Operating System: ALL
 PHP Version:      4.3.0
 New Comment:

I also added this workaround to the doc page.

$stat = explode('  ',mysql_stat($this->c_id));
list($stat[6],$stat[7]) =
preg_split('/\s(Q.+)/',$stat[6],-1,PREG_SPLIT_DELIM_CAPTURE);


Previous Comments:
------------------------------------------------------------------------

[2003-02-03 07:17:03] [EMAIL PROTECTED]

Reclassified as a documentation bug


------------------------------------------------------------------------

[2003-02-03 06:05:44] [EMAIL PROTECTED]

Ok, this is verified but this is not a PHP's bug, but a MySQL's. Please
post a MySQL's bug.

------------------------------------------------------------------------

[2003-02-02 11:32:47] [EMAIL PROTECTED]

a) split/preg_split uses regex, not explode
b) it would not work well as it'd split up everything
c) this is not related to html but rather a php string
d) the example in the manual uses explode on two spaces

If this is indeed true (one space before Queries) than this is a bug
... somewhere.

------------------------------------------------------------------------

[2003-02-02 03:23:43] [EMAIL PROTECTED]

In fact there are more space but the HTML output will read only one.
Use explode('[[:space:]]',$var) to divide it.

(You can verify that by looking at the HTML source.

------------------------------------------------------------------------

[2003-02-01 21:26:48] haafiz at ezwebsolutions dot ca

When I call mysql_stat(), it returns a string like this:

Uptime: 1182208  Threads: 13  Questions: 745284  Slow queries: 1 
Opens: 2210  Flush tables: 1  Open tables: 12 Queries per second avg:
0.630

All the fields are supposed to have two spaces ("  ") between each of
them so that an explode() will work on it.

However, you will notice that there is only 1 space (" ") between the
value of "Open Tables" and the caption "Queries per second avg:"

Is this how it is supposed to be? Or is this a minor bug?

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22005&edit=1


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to