If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to make a timer inside the database?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-04, 03:32
raladin raladin is offline
Registered User
 
Join Date: Jan 2004
Posts: 6
How to make a timer inside the database?

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..
Reply With Quote
  #2 (permalink)  
Old 01-24-04, 15:53
donsimon donsimon is offline
Registered User
 
Join Date: Jan 2004
Posts: 24
Not that I am aware of. You can write a cron script that could easily do it. But I don't think you can do that in 3.x or 4.x. With 5.x maybe, haven't used it enough to really know.

Donny
__________________
http://www.phpscripts.com/
Reply With Quote
  #3 (permalink)  
Old 01-24-04, 17:18
aus aus is offline
Registered User
 
Join Date: Oct 2003
Location: Denver, Colorado
Posts: 137
Re: How to make a timer inside the database?

You probably don't need to save a value like that in the database. It would make more sense to save an initial value and do calculations in your SELECT statement based upon the length of time since the record was created.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On