note 93494 added to mysqli.get-connection-stats
| From: | HockeyInJune at osu1 dot php dot net | Date: | Sat, 12 Sep 2009 22:13:32 +0000 |
| Subject: | note 93494 added to mysqli.get-connection-stats | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160497@lists.php.net to get a copy of this message | ||
While this function is only available if you're using the PHP MySQL Native Driver, you can get
the same statistics without this function by using the MySQL SHOW STATUS Query.
Use 'SHOW SESSION STATUS;' for statistics about the current MySQL session.
Use 'SHOW GLOBAL STATUS;' for totals since the server was started.
After you have established a connection with the MySQL Server:
$result = $mysqli->query('SHOW SESSION STATUS;', MYSQLI_USE_RESULT);
while ($row = $result->fetch_assoc()) {
$array[$row['Variable_name']] = $row['Value'];
}
$result->close();
print_r($array);
----
Server IP: 64.71.164.2
Probable Submitter: 96.232.150.35
----
Manual Page -- http://www.php.net/manual/en/mysqli.get-connection-stats.php
Edit -- https://master.php.net/note/edit/93494
Del: integrated -- https://master.php.net/note/delete/93494/integrated
Del: useless -- https://master.php.net/note/delete/93494/useless
Del: bad code -- https://master.php.net/note/delete/93494/bad+code
Del: spam -- https://master.php.net/note/delete/93494/spam
Del: non-english -- https://master.php.net/note/delete/93494/non-english
Del: in docs -- https://master.php.net/note/delete/93494/in+docs
Del: other reasons-- https://master.php.net/note/delete/93494
Reject -- https://master.php.net/note/reject/93494
Search -- https://master.php.net/manage/user-notes.php