trying to make energy for game (php mysql)

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Warden
Forum Newbie
Posts: 1
Joined: Wed Apr 21, 2010 9:04 am

trying to make energy for game (php mysql)

Post by Warden »

Hello,im beginner with php and mysql,and i have an game,im testing my skills on it etc,but i have problem,i want to make an energy,that it will update the energy with 5 on every 15 mins(for that im using cron jobs,i know how to use them),but i dont know how to make it

i want to make it like
it will add 5 energy into the energy column or smth,and the old one stays,so if it was 10,it will be 15.
and if its more then 100,it will put it to 100.

thanks,my english is kinda bad so yeah,i really would be happy if someone could help me and teach me it.
jesonkwilliam
Forum Newbie
Posts: 4
Joined: Mon Jul 19, 2010 10:39 pm

Re: trying to make energy for game (php mysql)

Post by jesonkwilliam »

I think you should not change anything in this because I like the idea of the column and that can easily run also. So basically you can start the thing what you exactly want to do. I really glad to see the logic like that. Good going man.
Post Reply