MySQL PHP - Time of answer

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marek

    MySQL PHP - Time of answer

    I have MySQL database and using PHP i make various questions. How can I get
    "time of answer" from MySQL in order to show it on site generated by PHP?

    --
    Mark


  • Pedro Graca

    #2
    Re: MySQL PHP - Time of answer

    Marek wrote:[color=blue]
    > I have MySQL database and using PHP i make various questions. How can I get
    > "time of answer" from MySQL in order to show it on site generated by PHP?[/color]

    I think it would be better to do it at the php side.

    <?php
    $start = microtime();

    // do your SQL and other stuff
    sleep(10);

    $finish = microtime();
    $time_taken = array_sum(explo de(' ', $finish))-array_sum(explo de(' ', $start));
    echo number_format($ time_taken, 2), " seconds<br/>\n";
    ?>
    --
    --= my mail box only accepts =--
    --= Content-Type: text/plain =--
    --= Size below 10001 bytes =--

    Comment

    Working...