How to priodically insert data into MySQL?

Codes here !

Moderators: macek, egami, gesf

yllkabaci
New php-forum User
New php-forum User
Posts: 3
Joined: Thu May 17, 2012 5:48 am

How to priodically insert data into MySQL?

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

Hello,
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 :)

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

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


Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 3 guests