Skip to main content
Inspiring
September 24, 2008
Question

Session Variable? -How do I treat this

  • September 24, 2008
  • 2 replies
  • 569 views
Hello,
I am writing an application that is tracking the results arriving from various selected stations (230 of them). My application will dynamically displays only stations for which results have been received. I plan to have my page refresh every 5 minutes to update the results list.

Now based on results received I will update a report page, so I need to set a variable that changes every time my query result set changes and then I will pass this new value to the report page for processing. I am confused about how to treat this variable. Should I use set it as a cookie or a session variable? (but it could change many times during the session)? TIA
    This topic has been closed for replies.

    2 replies

    Inspiring
    September 25, 2008
    Put the query into the page that is going to be refreshed every 5 minutes. Intermediate values probably don't matter since nobody is going to see them anyway.

    fober1 mentioned window.setTimeout for the page refresh. That's one method, but not the only one. Meta refresh also works.
    Inspiring
    September 24, 2008
    Hi,
    Your questions is not clear, so I'm not sure if this is what you are looking for.

    Let's forget for a moment how the data gets there, and let's focus on the report.
    You have a databases that get's constantly updated with new/changing records. It's sounds to me like you need to timestamp your data, and when the report page is opened, you need to aggregate data from now()-5 minutes to now() and display them.
    The refresh for the page every 5 minutes needs to be done with javascript (window.setTimeout)

    cheers,
    fober
    AbdlahAuthor
    Inspiring
    September 25, 2008
    Thanks for the help and sorry my question wasn't clear. I need to create a variable that will be updated frequently to reflect the number of reports that have been received (which corresponds with the number of records returned by my query).

    Now this variable could be updated many times within a session (every 5 minutes). So I am wondering whether a session variable is what I really need. I hope the question is clearer. TIA