SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Jul 2004
    Location
    USA
    Posts
    594
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ## Queries Executed

    Im looking to add a script to the footer page of my website to display something like the following:

    Page Generation Time: 0.15734 | 9 Queries Executed

    Did I need to add a counter for the queries and just add 1 to it each query I make or is there a process that automates it?

    The generation time I need a little help with too, ive seen topics with mktime() or something like that, do I just retrieve the time() before queries are executed and the time() after the queries are done and subtract them?
    BKerr

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by BKerr
    Did I need to add a counter for the queries and just add 1 to it each query I make or is there a process that automates it?
    You'll need to keep track with a counter of some sort.

    The generation time I need a little help with too, ive seen topics with mktime() or something like that, do I just retrieve the time() before queries are executed and the time() after the queries are done and subtract them?[/QUOTE]More or less, yes. Dan Grossman has a simple class that makes this easy. If you do a search you should be able to find it.


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
  •