note 32596 added to function.mysql-stat
| From: | mike at pcmedx dot com | Date: | Mon, 02 Jun 2003 14:37:57 +0000 |
| Subject: | note 32596 added to function.mysql-stat | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49565@lists.php.net to get a copy of this message | ||
The example given does not work exactly as shown. Apparently, it's MySQL that returns the
string incorrectly, not PHP (one space between the last two items rather than two). Here's a
nice solution that returns the corrected array:
$stat = explode(' ',mysql_stat($conn_id));
list($stat[6],$stat[7]) = preg_split('/\s(Q.+)/',$stat[6],-1,PREG_SPLIT_DELIM_CAPTURE);
----
Manual Page -- http://www.php.net/manual/en/function.mysql-stat.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32596
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32596&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32596&report=yes