Posted 10 May 2006 - 08:57 PM
I need to write a script that allows a database to automatically update itself even if a user is not there, but I'm not sure how to go about it. Can anyone say?
What I want to happen is something like this:
A user sets something to true in a database (it doesn't really matter how this happens, I'll do that).
The user can then go away, close their browser and end their session, or whatever.
Something in the database updates every now and then (say every 30 seconds).
They come back later, the value having changed.
The best example I can think of is, for example, in online PHP games where you get a mining thing or something and you get some metal whether or not you are at the computer. You can then see how much you have when you come back.
Posted 10 May 2006 - 09:48 PM
Posted 13 May 2006 - 07:22 PM
Posted 14 May 2006 - 05:55 AM
Please, take the time and do some research and find out how much it would have cost you to get your help from a decent paid-for source. A "roll-of-the-dice" freelancer will charge you $5-$15/hr. A decent entry level freelancer will charge you around $15-30/hr. A professional will charge you anywhere from $50-$100/hr. An agency will charge anywhere from $100-$250/hr. Think about all this when soliciting for help here. Think about how much money you are making from the work you are asking for help on. No, we do not expect you to pay for the help given here, but donating a few bucks is a fraction of the cost of what you would have paid, shows your appreciation, helps motivate people to keep offering help without the pricetag, and helps make this a higher quality free-help community
Posted 14 May 2006 - 02:02 PM
Not sure what platform you are using but generally a cron job can be set up on a *nix server by using the "crontab" command. Generally "-l" will list all cron jobs and "-e" will allow you to ammend the crontab. An entry would look something like the following:
15 2 * * 2 /usr/bin/php -q /home/webmaster/scripts/newsletter.php
minute, hour, month, day of month, day of week, script
More information on the cron can be found at [a href=\"http://www.adminschoice.com/docs/crontab.htm\" target=\"_blank\"]http://www.adminschoice.com/docs/crontab.htm[/a] or "man crontab".
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users