Create column 'timer' in SQL

0

Is it possible to do a timer type column, which calculates 24 hours? For example, PHP starts this timer in this column, and until it zeroes the user is prevented from performing such an action. However, when it does, it returns to 24:00:00 and only starts when the user executes the process which can only be done every 24 hours.

Update: I was able to add the table to the date and time perfectly. I'm just wondering how to compare this date logged in SQL and the current date to see if it's been 24 hours ...

Image of the SQL table:

    
asked by anonymous 15.05.2015 / 11:57

1 answer

1

I think it's easier to resolve this with a datetime column. So PHP queries the column, checks to see if more than 24 hours have passed between the current date and the date of the column, and does what it has to do. After that it updates the column with the current date.

    
15.05.2015 / 12:01