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 build database-driven web sites. Previously I have used Perl or PHP with MySQL.
I want to run a web application on php and mysql, using the CakePHP
I know that Java have its own garbage collection, but sometimes I want to
Zend Project with multiple modules and every modules have its own routes.ini defined inside
I'm writing a web based application that will have its own authorization/authentication mechanism (traditional
I have a PHP script that syncs data with a third party service, and
I have a php application ( http://github.com/tchalvak/ninjawars ), essentially a php-based webgame that I
I have a simple application here (QandATable2.php) where when the user clicks on the
I have a PHP application which I have running on Amazon's Web Services. It's
OK I have a mySQL Database that looks something like this ID - an

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.