Number of mysql queries made

Discussion in 'PHP' started by Anathema, Jun 20, 2008.

  1. #1
    Its my first post on digitalpoint :)


    I have to simple problem I hope anybody ppl make a resolve for me.
    whatever I am trying to put some debug information at the bottom of my source code's.
    So I have page execution time ( aka. using to PHP'S microtime before and after the code flow ) but, I also want to know how many queries were made on each page. I need to yours idea for it. How can I do this.

    Thanks for your reply and time.

    - Anathema.
     
    Anathema, Jun 20, 2008 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    $_GLOBALS['mysql']++;

    and then first declare $_GLOBALS['mysql'] = 0;

    :)
     
    EricBruggema, Jun 20, 2008 IP
  3. Anathema

    Anathema Peon

    Messages:
    128
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for interested and time, I resolved to problem.
     
    Anathema, Jun 20, 2008 IP