Posted By

wolfie on 11/17/06


mysql sql

Versions (?)

How to determine a timeout using unix time in mysql

 / Published in: SQL

This will return the number of seconds between now and when the time field was inserted.

  1. SELECT unix_timestamp(current_timestamp) - unix_timestamp(time_field) AS timediff
  2. FROM table_name;

Report this snippet  

You need to login to post a comment.