[PHP-DB] Automatically +1 every 30 mins to a value in the database.

2006-06-02 Thread Alex Major
Hi there. 
I've posted this up on both this list, and the mysql list as I'm not sure
whether this is something that I'd need to do with the php or mysql.

Basically, I am making an add-on to my small website which is a mini online
game. Every user will have gold, and every 30mins I'd like their amount of
gold to go up by 1 (or say a variable say $goldupdateamount).

I'd like to know which would be the best way of doing this, and if there is
a command in php which would achieve this.

Regards, 
Alex.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Automatically +1 every 30 mins to a value in the database.

2006-06-02 Thread David Robley
Alex Major wrote:

 Hi there.
 I've posted this up on both this list, and the mysql list as I'm not sure
 whether this is something that I'd need to do with the php or mysql.
 
 Basically, I am making an add-on to my small website which is a mini
 online game. Every user will have gold, and every 30mins I'd like their
 amount of gold to go up by 1 (or say a variable say $goldupdateamount).
 
 I'd like to know which would be the best way of doing this, and if there
 is a command in php which would achieve this.
 
 Regards,
 Alex.

Assuming you are on a *nix system, you could run a CLI script every $period
from cron; for Windows I think there is a task scheduler (or similar name)
that allows the same thing.



Cheers
-- 
David Robley

I tried to daydream, but my mind kept wandering.
Today is Pungenday, the 7th day of Confusion in the YOLD 3172. 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Automatically +1 every 30 mins to a value in the database.

2006-06-02 Thread tg-php
An alternative to cron jobs or scheduled tasks (if they're not an option) is to 
have a marker somewhere (probably in your database) that records a timestamp 
for the last 'gold' update then when someone does get around to accessing the 
database through normal operations, have it figure out how many 30 minute 
periods have occurred between the timestamp and now and update the gold then.

The cron job is preferrable but if you're looking for alternate ideas, there's 
one for ya.

Good luck!

-TG

= = = Original message = = =

Hi there. 
I've posted this up on both this list, and the mysql list as I'm not sure
whether this is something that I'd need to do with the php or mysql.

Basically, I am making an add-on to my small website which is a mini online
game. Every user will have gold, and every 30mins I'd like their amount of
gold to go up by 1 (or say a variable say $goldupdateamount).

I'd like to know which would be the best way of doing this, and if there is
a command in php which would achieve this.

Regards, 
Alex.


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] SSL implementation

2006-06-02 Thread Blanton, Bob
Hi,
  I'm new to web programming and Apache  PHP so this may seem like a
dumb question.  Is there a preferred way to implement SSL in a website
or web application?  Is it handled using PHP or Apache?  Or both?  I see
there is the Apache Open SSL server and the mod_ssl.  Seems there are
many options to choose from.  

  Does anyone have any Pros/Cons on the subject of which implementation
is best?

  Thanks for your comments,
Bob
  

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php