Re: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Tom
Radwan Aladdin wrote:

Hi all

Is it possible in mySQL to put a timer that changes a value inside a row in a table every while?

For example : Add "1" to the value very 10 minutes for example.. Field number = 5 after ten minutes = 6 after another 10 minuste = 7..Etc..

Is it possible?And how?

Regards..

 

I am not aware of any such functionality within MySQL.

However if you have a one-one relationship between a period of time and 
an incremental,
could you not simply INSERT a timestamp and then compare with times with 
NOW,
and then divide by your time period?

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


RE: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Chris Kay


http://www.unixgeeks.org/security/newbie/unix/cron-1.html


Chris Kay (CK)
Eleet Internet Services
M: 0415 451 372
P: 02 4620 5076
F: 02 4620 7008
E: [EMAIL PROTECTED]

-Original Message-
From: Radwan Aladdin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 20 January 2004 9:05 PM
To: Nick JORDAN
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Please help me as fast as possible.. very important!!

Where can I fin tutorials about it? (CRON Tab)?

Regards..
- Original Message -
From: "Nick JORDAN" <[EMAIL PROTECTED]>
To: "Radwan Aladdin 
Sent: Tuesday, January 20, 2004 1:56 PM
Subject: Re: [PHP] Please help me as fast as possible.. very important!!


> > Is it possible in mySQL to put a timer that changes a value inside a 
> > row in a table every while?
>
> > For example : Add "1" to the value very 10 minutes for example..
> > Field number = 5 after ten minutes = 6 after another 10 minuste =
> 7..Etc..
>
>
> As far as I'm aware, that's not possible in MySQL, however you could 
> write a small script in PHP (or, indeed, some other language) which 
> would increment the counter, and which would be run at intervals via 
> cron (for instance).
>
> A better solution, however, would be to include a timestamp in your 
> database, then, when data is requested, calculate how many units of 
> ten minutes have passed and adjust your counter accordingly.
>
> Nick
>

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

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



RE: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Angelo Zanetti
Im not sure about php but if you are desperate then you could also do it in
VB with a timer control.

-Original Message-
From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Please help me as fast as possible.. very important!!
Importance: High


Hi all

Is it possible in mySQL to put a timer that changes a value inside a row in
a table every while?

For example : Add "1" to the value very 10 minutes for example.. Field
number = 5 after ten minutes = 6 after another 10 minuste = 7..Etc..

Is it possible?And how?

Regards..


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911

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



Re: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Mario
The only thing you need to know is that you enter a file in the cron dir (in
/etc I think) and you have the following line in that file:
52 10 * * * /usr/bin/php /home/mainwebsite_html/file.php

this line runs the file.php every day at 10.52

(min hour week month year) (php dir) (file location) - the star means any
day-month-year [i'm not sure if it's week month year or year month week]

If there is a cron.daily or monthly ...etc... you don't need to specify the
first part (date time stuff)

e.g.  /usr/bin/php /home/mainwebsite_html/file.php





- Original Message - 
From: "Radwan Aladdin" <[EMAIL PROTECTED]>
To: "Nick JORDAN" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, January 20, 2004 12:05 PM
Subject: Re: [PHP] Please help me as fast as possible.. very important!!


> Where can I fin tutorials about it? (CRON Tab)?
>
> Regards..
> - Original Message -
> From: "Nick JORDAN" <[EMAIL PROTECTED]>
> To: "Radwan Aladdin 
> Sent: Tuesday, January 20, 2004 1:56 PM
> Subject: Re: [PHP] Please help me as fast as possible.. very important!!
>
>
> > > Is it possible in mySQL to put a timer that changes a value inside a
> > > row in a table every while?
> >
> > > For example : Add "1" to the value very 10 minutes for example..
> > > Field number = 5 after ten minutes = 6 after another 10 minuste =
> > 7..Etc..
> >
> >
> > As far as I'm aware, that's not possible in MySQL, however you could
write
> > a small script in PHP (or, indeed, some other language) which would
> > increment the counter, and which would be run at intervals via cron (for
> > instance).
> >
> > A better solution, however, would be to include a timestamp in your
> > database, then, when data is requested, calculate how many units of ten
> > minutes have passed and adjust your counter accordingly.
> >
> > Nick
> >
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



RE: [PHP] Please help me as fast as possible.. very important!![Scanned]

2004-01-20 Thread Michael Egan
http://www.google.com/linux?hl=en&lr=&ie=ISO-8859-1&q=cron+tutorials&btnG=Google+Search

> -Original Message-
> From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
> Sent: 20 January 2004 10:05
> To: Nick JORDAN
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Please help me as fast as possible.. very
> important!![Scanned]
> 
> 
> Where can I fin tutorials about it? (CRON Tab)?
> 
> Regards..
> - Original Message -
> From: "Nick JORDAN" <[EMAIL PROTECTED]>
> To: "Radwan Aladdin 
> Sent: Tuesday, January 20, 2004 1:56 PM
> Subject: Re: [PHP] Please help me as fast as possible.. very 
> important!!
> 
> 
> > > Is it possible in mySQL to put a timer that changes a 
> value inside a
> > > row in a table every while?
> >
> > > For example : Add "1" to the value very 10 minutes for example..
> > > Field number = 5 after ten minutes = 6 after another 10 minuste =
> > 7..Etc..
> >
> >
> > As far as I'm aware, that's not possible in MySQL, however 
> you could write
> > a small script in PHP (or, indeed, some other language) which would
> > increment the counter, and which would be run at intervals 
> via cron (for
> > instance).
> >
> > A better solution, however, would be to include a timestamp in your
> > database, then, when data is requested, calculate how many 
> units of ten
> > minutes have passed and adjust your counter accordingly.
> >
> > Nick
> >
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



Re: [PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Radwan Aladdin
Where can I fin tutorials about it? (CRON Tab)?

Regards..
- Original Message -
From: "Nick JORDAN" <[EMAIL PROTECTED]>
To: "Radwan Aladdin 
Sent: Tuesday, January 20, 2004 1:56 PM
Subject: Re: [PHP] Please help me as fast as possible.. very important!!


> > Is it possible in mySQL to put a timer that changes a value inside a
> > row in a table every while?
>
> > For example : Add "1" to the value very 10 minutes for example..
> > Field number = 5 after ten minutes = 6 after another 10 minuste =
> 7..Etc..
>
>
> As far as I'm aware, that's not possible in MySQL, however you could write
> a small script in PHP (or, indeed, some other language) which would
> increment the counter, and which would be run at intervals via cron (for
> instance).
>
> A better solution, however, would be to include a timestamp in your
> database, then, when data is requested, calculate how many units of ten
> minutes have passed and adjust your counter accordingly.
>
> Nick
>

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



RE: [PHP] Please help me as fast as possible.. very important!![Scanned]

2004-01-20 Thread Michael Egan
I've never done it but I can only imagine you'd need to run some sort of CRON job to 
effect this at regular intervals.

HTH,

Michael Egan

> -Original Message-
> From: Radwan Aladdin [mailto:[EMAIL PROTECTED]
> Sent: 20 January 2004 09:45
> To: [EMAIL PROTECTED]
> Subject: [PHP] Please help me as fast as possible.. very 
> important!![Scanned]
> Importance: High
> 
> 
> Hi all
> 
> Is it possible in mySQL to put a timer that changes a value 
> inside a row in a table every while?
> 
> For example : Add "1" to the value very 10 minutes for 
> example.. Field number = 5 after ten minutes = 6 after 
> another 10 minuste = 7..Etc..
> 
> Is it possible?And how?
> 
> Regards..
> 

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



[PHP] Please help me as fast as possible.. very important!!

2004-01-20 Thread Radwan Aladdin
Hi all

Is it possible in mySQL to put a timer that changes a value inside a row in a table 
every while?

For example : Add "1" to the value very 10 minutes for example.. Field number = 5 
after ten minutes = 6 after another 10 minuste = 7..Etc..

Is it possible?And how?

Regards..