Page 1 of 1

PHP script for checking database updates

Posted: Tue Aug 10, 2010 3:47 pm
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.

Re: PHP script for checking database updates

Posted: Tue Aug 10, 2010 5:12 pm
by Gargoyle
use auto_increment or add a "date_added" column to your table.

Re: PHP script for checking database updates

Posted: Wed Aug 11, 2010 3:19 am
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 ...

Re: PHP script for checking database updates

Posted: Wed Aug 11, 2010 4:21 am
by novito
Check out cron jobs for scheduled tasks...