PHP script for checking database updates

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sanv
Forum Newbie
Posts: 12
Joined: Thu Nov 01, 2007 12:43 pm

PHP script for checking database updates

Post by sanv »

Hi,

I would like to implement the following scenario.

I have a database that contains longitude and latitude information about different nodes.
I would like to write a PHP script that checks if the table has a new entry, and if there is a new entry fetch the data and pass it to another script that uses the long/lat data to refresh the Google Map.

What would be the best way to solve this issue?

thanks in advance.
Gargoyle
Forum Contributor
Posts: 130
Joined: Wed Jul 14, 2010 12:25 am

Re: PHP script for checking database updates

Post by Gargoyle »

use auto_increment or add a "date_added" column to your table.
sanv
Forum Newbie
Posts: 12
Joined: Thu Nov 01, 2007 12:43 pm

Re: PHP script for checking database updates

Post by sanv »

I have solved this issue. However, I am not sure on how to run the PHP script as "daemon" or in the background that periodically checks whether the DB is updated ...
User avatar
novito
Forum Commoner
Posts: 26
Joined: Mon Apr 07, 2008 11:08 am

Re: PHP script for checking database updates

Post by novito »

Check out cron jobs for scheduled tasks...
Post Reply