Board index   FAQ   Search  
Register  Login
Board index php forum :: Database mySQL & php coding

How to priodically insert data into MySQL?

Codes here !

Moderators: macek, egami, gesf

How to priodically insert data into MySQL?

Postby yllkabaci » Fri Jun 22, 2012 10:50 pm

i have to write an application in php-mysql that have to:
1. get and display weather from Yahoo weather (done).
2. every day should save the min and max temp in a mysql database.

the application should save the temperature every day, even when it is not opened by a user.
is there any method to insert data into database periodically, without depending on user access of the page? :?
thankyou :)
New php-forum User
New php-forum User
Posts: 3
Joined: Thu May 17, 2012 5:48 am

Re: How to priodically insert data into MySQL?

Postby johnj » Sat Jun 23, 2012 1:40 am

1.write the method that will get the data and insert into the database.
2.create a cron job and run the above method..say every day at 6 am
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Return to mySQL & php coding

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.