Jump to content

Recommended Posts

You need to set up a Cron Job to run every night at a certain time to reset the stat.

I don't have any experience, but you can always google it.

[!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]
Link to comment
https://forums.phpfreaks.com/topic/10104-need-some-help/#findComment-37609
Share on other sites

please take the time to post a more specific question. you are only doing yourself a dis-service, as nobody can help you if they don't know the details.

for instance, i can assume that you have a column called mana in a mysql database, and i can assume that the value for fully recharged mana is 100. so the query string would look like this:

update tablename set mana=100

and i can assume that you know enough php to be able to connect to your database and run that query, and i can assume that if i told you to make a cron job and set it for every 24 hours, you'd know what i was talking about.

but that's a lot of assumptions and this could very easily have been a complete waste of time posting this help, as none of it could apply to you. is it really that hard to be more specific?

i'm sorry. i'm tired. been up for almost 48 hours. but it's true, nonetheless. that just happens to be one of my pet peeves.
Link to comment
https://forums.phpfreaks.com/topic/10104-need-some-help/#findComment-37620
Share on other sites

re: barand's alternative: A person's mana will not actually recharge until they access the script that does that. So you could have some people who access that script everyday, and other people who only login once a week. They will be recharged just the same, but at different, user dependent times. You may or may not need to consider that in how you want your code to behave.
Link to comment
https://forums.phpfreaks.com/topic/10104-need-some-help/#findComment-37630
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.