General Community > Scripting Help

mySQL info

(1/1)

Aquilo:
how do you find the number of queries used and amount of data or size eg(5kb) returned?

I was hoping it was in this mess but it wasn't

--- Code: ---<?php 
$x = mysql_query ("SHOW STATUS");
while ( list($key,$ver) = mysql_fetch_array($x) ) {
echo $key, &#39; => &#39;, $ver, &#39;<br />&#39;;
}
?>
--- End code ---

Spaceman-Spiff:
number of queries: make a new function for dbQuery and increment the counter by 1 everytime the function is called

data size: http://www.php.net/manual/en/function.mysql-fetch-lengths.php or http://www.php.net/manual/en/function.mysql-field-len.php

Aquilo:
oh... ok! cool I thought it recorded and had a callback for each mysql_connect(). Thanks for the info and links!

Navigation

[0] Message Index

Go to full version