:> Code This mysql_stat / database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    :> Code This mysql_stat / database

    PHP Code:
    <?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 ?
    Last edited by just_m3.; 21.07.11, 11:04.
    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!

    #2
    I have no other idea than try to select just yours db. :D

    PHP Code:
    function mysql_memusage() {
    $cdb mysql_connect('your_db''user''pass');
    $array explode("  "mysql_stat($cdb));  
    foreach (
    $array as $k => $value){
    echo 
    $value "<br />";
    }
    return;

    Last edited by arnage; 23.07.11, 13:30.
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment


      #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!

      Comment

      Working...
      X