:> Code This mysql_stat / database

Started on the old forum in July 2011 · view the original in the archive · old links redirect here

2 replies · 390 views · started 15 years ago · 1 min read

2 participants
just_m3. Developer · 199 posts #1
<?php 

function mysql_memusage()
{$array = explode("  ", mysql_stat()); 
foreach ($array as $value){echo $value . "<br />";}}

echo mysql_memusage();

?>

Now the thing is that is no way that the bellow results to be from my database that i am connected

Uptime: 1206596 Threads: 20 Questions: 1097213170 Slow queries: 255 Opens: 27605568 Flush tables: 1 Open tables: 256 Queries per second avg: 909.345

These are huge values for a script with 7 tables 🤨 is there any way that i can check this values but only for my database and not for the whole freakin host lol 😊 ?

This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!

arnage Lead · 811 posts #2

I have no other idea than try to select just yours db. 😀

function mysql_memusage() {
$cdb = mysql_connect('your_db', 'user', 'pass');
$array = explode("  ", mysql_stat($cdb));  
foreach ($array as $k => $value){
echo $value . "<br />";
}
return;
}
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
just_m3. Developer · 199 posts #3

Thanx .. i will try ..

This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close