SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb How to fetch data in timely manner in php

    Hello site point forums.
    I am designing a website for one of my customer in which database and programming is involved.
    There is a control panel in which there are three different forms connected to three different tables ... the customer logs in and enter some values in those forms and these values are then stored in data base now the problem is to display these stored values on index page in timely manner.
    like after every 15 minutes or after every hour the values which were stored can automatically updated on the website main page in timely manner?
    can any one help me with this?

  2. #2
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    352
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What's throwing me off is your Timely manner.. i don't understand what timing your expecting, are you saying usability wise or programming?

    To fill out 3 forms and populate them into a table should not take any time at all adding to the database and to post it every 15 minutes on the website you can do 2 things run a JQuery AJAX request every 15 minutes or run a cron job.

    It really depends on your application structure is where the real question is.

    My recommendation is come up with a workflow of your application and create a logic from there, before you start asking questions (not to sound rude lol )
    Sr. Website Developer and Internet Marketing
    www.CarlosJa.com Note: If anyone
    needs to get ahold of me please feel free to email me through
    my site. Apparently i missed quite a few private messages.

  3. #3
    SitePoint Member
    Join Date
    Jun 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you sir for you kind answer. i will focus on workflow of application if any problem occurs i will ask again ..
    thanks again

  4. #4
    SitePoint Addict
    Join Date
    Jan 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    It seems as if perhaps you don't want to query the database for every time your index page loads.

    In this case you can use caching where you write the results of the database query and the page to a file. This is then loaded most of the time and you can check the file time and only refresh the cache after 15 minutes or whatever time you wish to rewrite the file content.

    I hope this helps.


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
  •