Professional Web Applications Themes

Realtime PHP graph from database - PHP Development

Hi, I present a screen to the user with a graph (PHP, GD lib) from data that comes from MySQL database, the page is auto-refreshed each 10 seconds with: <META HTTP-EQUIV= "Refresh" CONTENT= 10> This is already working! The problem is that the query to get the data takes about 6 seconds to execute, during that time the browser (IE6) show me a blank page... Anyone know an easy solution for this? Any public libraries with this functionality? Many thanks in advance. Pedro...

  1. #1

    Default Realtime PHP graph from database

    Hi,
    I present a screen to the user with a graph (PHP, GD lib) from data
    that comes from MySQL database, the page is auto-refreshed each 10
    seconds with:
    <META HTTP-EQUIV= "Refresh" CONTENT= 10>
    This is already working!

    The problem is that the query to get the data takes about 6 seconds to
    execute, during that time the browser (IE6) show me a blank page...
    Anyone know an easy solution for this? Any public libraries with this
    functionality?
    Many thanks in advance.
    Pedro
    Pedro Ferreira Guest

  2. #2

    Default Re: Realtime PHP graph from database

    On 2 Dec 2003 10:10:12 -0800, [email]pedro_nf[/email] (Pedro Ferreira) wrote:
    >I present a screen to the user with a graph (PHP, GD lib) from data
    >that comes from MySQL database, the page is auto-refreshed each 10
    >seconds with:
    ><META HTTP-EQUIV= "Refresh" CONTENT= 10>
    >This is already working!
    >
    >The problem is that the query to get the data takes about 6 seconds to
    >execute, during that time the browser (IE6) show me a blank page...
    >Anyone know an easy solution for this? Any public libraries with this
    >functionality?
    How about generating a graph in advance; when you load the page, display the
    graph generated in the previous step, and then start writing the next one to a
    temporary file or into a session variable.

    On the first display you'd have to generate two graphs (one to display now,
    one for the next load). On the last display when the user closes the browser
    you'll have wasted a graph generation, but presumably with such a frequent
    refresh rate the user will be looking at quite a few graphs anyway.

    --
    Andy Hassall (andyandyh.co.uk) icq(5747695) ([url]http://www.andyh.co.uk[/url])
    Space: disk usage ysis tool ([url]http://www.andyhsoftware.co.uk/space[/url])
    Andy Hassall Guest

  3. #3

    Default Re: Realtime PHP graph from database

    How do you do this?
    -Ike

    "Pedro Ferreira" <pedro_nf> wrote in message
    news:caf0f81e.0312021010.4737c963posting.google.c om...
    > Hi,
    > I present a screen to the user with a graph (PHP, GD lib) from data
    > that comes from MySQL database, the page is auto-refreshed each 10
    > seconds with:
    > <META HTTP-EQUIV= "Refresh" CONTENT= 10>
    > This is already working!
    >
    > The problem is that the query to get the data takes about 6 seconds to
    > execute, during that time the browser (IE6) show me a blank page...
    > Anyone know an easy solution for this? Any public libraries with this
    > functionality?
    > Many thanks in advance.
    > Pedro

    Ike Guest

Similar Threads

  1. Realtime/Non Realtime audio mixing?
    By G.I.L in forum Macromedia Director Lingo
    Replies: 1
    Last Post: May 22nd, 07:09 PM
  2. Replies: 2
    Last Post: January 24th, 04:32 PM
  3. GD::Graph - how to get rid of leading gap in line graph?
    By carcassone_fr@yahoo.com in forum PERL Modules
    Replies: 0
    Last Post: October 1st, 04:56 PM
  4. Realtime chat software?
    By Eric in forum Mac Networking
    Replies: 3
    Last Post: September 18th, 01:04 AM
  5. realtime recording using director is possible ?
    By kwang woo lee in forum Macromedia Director Lingo
    Replies: 2
    Last Post: July 30th, 08:05 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139