Number to increase automatically

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
Aki
Forum Newbie
Posts: 8
Joined: Fri Jan 09, 2009 5:38 pm

Number to increase automatically

Post by Aki »

I'm relatively new to PHP and MySQL, and I want to write a code which updates a certain value by adding one each hour or day or something. Could anyone help me?
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: Number to increase automatically

Post by it2051229 »

yes it is possible, you can base that incrementing of value from the computer's system time.
Aki
Forum Newbie
Posts: 8
Joined: Fri Jan 09, 2009 5:38 pm

Re: Number to increase automatically

Post by Aki »

it2051229 wrote:yes it is possible, you can base that incrementing of value from the computer's system time.
Wouldn't that mean a user could increase this value by simply adjusting the clock on his computer?
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: Number to increase automatically

Post by it2051229 »

I'm relatively new to PHP and MySQL, and I want to write a code which updates a certain value by adding one each hour or day or something
you never mentioned THAT it interacts with user. now i'm confused
Aki
Forum Newbie
Posts: 8
Joined: Fri Jan 09, 2009 5:38 pm

Re: Number to increase automatically

Post by Aki »

it2051229 wrote:you never mentioned THAT it interacts with user. now i'm confused
sorry, I'll explain it further.

What I'm trying to do is to write a script which will increase the value for the users constantly, say by 1 per hour or something. And I might be wrong but if it's set after the different users' computer watches, wouldn't that make it easy to "cheat" having the value increase more than it's supposed to, by adjusting the time?
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: Number to increase automatically

Post by it2051229 »

i'm talking about the "server" time, not the client's computer time so they can't cheat unless someone(e.g. you) has access to the server computer and do it.
Post Reply