Jump to content

HELP! - PHP script that updates a row in a table based on time passed


Modern Merlin

Recommended Posts

I need to write a script that I have never attempted before  and would love it if someone could point me in the right direction... 

 

Basically, it would be like this. User signs up for an account and then creates a sub account. The moment the user creates a sub account that time is saved to the Database (even when they are not logged in the script should still be running). Every time the script is run it adds a number to another number in the table and saves the new number to the Database until that number reaches a set number. Once it reaches that number the script should still check every 10 minutes to see if the number has gone below the set number and if so start adding again.

 

Thanks!

 

MM

yeah...you're going to have to be more specific here.  For instance, you say you want it to be "running" even if the user isn't logged in, but then you say that you want some value in a table to be incremented whenever some script is run.  Is this the login script, as in, every time the user logs in, you want a value in a table incremented?  If so, I don't really see why you would need it to be "continually running." Or are other users somehow able to increment this user's number? Or is this number even associated to a specific user? How is the number supposed to go down? Do you want the script itself to increment the number every x amount of time and then the number is decreased based on some action by the user? 

 

Come on man, we aren't psychic. You need to be very detailed even providing examples.

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.