note 33270 added to function.mysql-stat

From: Date: Fri, 20 Jun 2003 15:05:02 +0000
Subject: note 33270 added to function.mysql-stat
Groups: php.notes 
Request: Send a blank email to php-notes+get-50751@lists.php.net to get a copy of this message
Mike, your script is correct, though I have a small remark. With your solution the descriptions and values will all have a different index in the array: array[0] = Uptime array[1] = 5380 etc. With: $stat = explode(' ',mysql_stat($conn_id)); list($stat[6],$stat[7]) = preg_split('/\s(Q.+)/',$stat[6],-1,PREG_SPLIT_DELIM_CAPTURE); that's solved (2 spaces as first argument in the explode function). ---- Manual Page -- http://www.php.net/manual/en/function.mysql-stat.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33270 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33270&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33270&report=yes

« previous php.notes (#50751) next »