TheLostGuru Posted February 7, 2007 Share Posted February 7, 2007 Hi, What I want to do is have users log into a page and be able to pull information from a database. I want the database to update itself every 5 minutes and resend its information back to the users logged in after it has finished updating. Is this even possible? And if so, how would I go about doing this? Thanks TheLostGuru Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/ Share on other sites More sharing options...
hvle Posted February 7, 2007 Share Posted February 7, 2007 yes, it is possible, although the mechanism is not as you wished. You will need to write a page that doing all the update, statistic... and Set the pageto refresh every 5 mins as you wanted, and bam, you have a fresh updated page. Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178892 Share on other sites More sharing options...
TheLostGuru Posted February 7, 2007 Author Share Posted February 7, 2007 Thanks for the quick response. I am a little confused by your reply, though. "wite a page that doing all the update, statistic..." Is this the page that a user brings up, or where is this page? and is this the page that is refreshed every 5 minutes? Or is it the user's page that is refreshed every 5? Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178903 Share on other sites More sharing options...
hvle Posted February 7, 2007 Share Posted February 7, 2007 yes, that is the page that user bring up after successfully logged in. It is like watch a live hockey game on yahoo. Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178906 Share on other sites More sharing options...
JasonLewis Posted February 7, 2007 Share Posted February 7, 2007 what hvle is saying is that you need a php page which will do the updating, then set the meta refresh to 5 mins then it will update. i think. Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178909 Share on other sites More sharing options...
TheLostGuru Posted February 7, 2007 Author Share Posted February 7, 2007 I only want the database to be updated every 5 minutes from one location. Then I want it to notify all of the users logged in that new information is available and send them the new information. I'm not sure if I was clear in my first post. Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178912 Share on other sites More sharing options...
hvle Posted February 7, 2007 Share Posted February 7, 2007 Now i am more clear on what your goal is. Simple answer is no. But such a thing is not impossible. Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178919 Share on other sites More sharing options...
TheLostGuru Posted February 7, 2007 Author Share Posted February 7, 2007 hm... I hope it is not impossible. Just another example that might help clear up my question. Even if no users are logged in, the database should still update itself every 5 minutes. Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178931 Share on other sites More sharing options...
hvle Posted February 7, 2007 Share Posted February 7, 2007 the database can not update itself. You need to write a script update the database, and have a cronjob (something like this) run this script every 5 mins. Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178933 Share on other sites More sharing options...
TheLostGuru Posted February 7, 2007 Author Share Posted February 7, 2007 What is a cronjob? Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178940 Share on other sites More sharing options...
JasonLewis Posted February 7, 2007 Share Posted February 7, 2007 aha, thats what you need to research. Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178943 Share on other sites More sharing options...
hvle Posted February 7, 2007 Share Posted February 7, 2007 If you google it you would find better answer than mine. Cronjob is a scheduled task, say you want your alarm clock turn on M - F at 8am. Cronjob is very similar to that idea. Instead of having heard annoying sound, you can run a script, and this script update the database. Link to comment https://forums.phpfreaks.com/topic/37424-php-and-mysql/#findComment-178944 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.