SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Timing Query.

  1. #1
    SitePoint Enthusiast PlayStone's Avatar
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Timing Query.

    Hi guys,

    I want to put on my search page how long a query took. Something like google does:
    "Your search took x.xxx seconds".

    Is there a PHP function that already does this?

    Thanks.

  2. #2
    SitePoint Guru SharifTK's Avatar
    Join Date
    Jan 2004
    Location
    New York, NY
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read the manual entry for microtime():

    http://us4.php.net/microtime
    SK

  3. #3
    SitePoint Enthusiast PlayStone's Avatar
    Join Date
    Jan 2004
    Location
    Canada
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by SharifTK
    Read the manual entry for microtime():

    http://us4.php.net/microtime
    Thanks a lot SharifTK.
    That worked nicely.

  4. #4
    SitePoint Guru SharifTK's Avatar
    Join Date
    Jan 2004
    Location
    New York, NY
    Posts
    621
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Format your time using mktime()

    http://us4.php.net/manual/en/function.mktime.php

    SK


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •