Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3214834
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:06:25+00:00 2026-05-17T15:06:25+00:00

I have, at its heart, a php/mysql application. Every ~15 minutes new data is

  • 0

I have, at its heart, a php/mysql application. Every ~15 minutes new data is added to the database. I want to notify users that new data is in the database.
I was thinking of having some JS run on the clients computer to check for updates every 60 seconds, but I don’t want to pull down the results unless something has actually changed/been added in the DB.

So my question is: using PHP/JS/MYSQL what is the best way for clients to detect new rows in the DB?

One possible solution I was kicking around was having a seperate table called “switch” with a BOOL called ‘switch’, and everytime I update the DB setting “switch” to true for 60 seconds. Then the client computers check to see if switch.switch = ‘1’ (true) every 60 seconds.
Thoughts? I’m open to suggestions on any part of this plan? I do have the jQuery library loaded if anyone wants to make a jQuery suggestion…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:06:26+00:00Added an answer on May 17, 2026 at 3:06 pm

    Instead of your “switch” just being a flag, have it be a version number. Increment the number whenever you put new stuff in the database. Then the clients just compare their number with the one they fetch periodically, and when the numbers are different they know it’s time for an update. (Obviously they remember the new number for the next test …)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched around but not gotten much help. Here's my problem. I want
In my Zend framework Project I want to create a Cron Job . I.e.,
Greetings! I have heard of various methods to capture and return text. For example
You may have heard of a website called Project Euler (projecteuler.net). I'm working through
Dear All, i have a txt file like: --start-- jeff --end-- --start-- sophya --end--
I have thought of a GC which I can't see major flaws with, and
I have heard you can not insert a row first and immediately update it
This is the toughest query I ever made: http://robertr.pastebin.com/X4bG4pFp SELECT `user`.`id` , `user`.`fname` ,
I'm in the planning and learning stages of building a facebook game. For the
I am wondering, that each char in Unicode has a code point; what's the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.