How to determine a timeout using unix time in mysql


/ Published in: SQL
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. SELECT unix_timestamp(CURRENT_TIMESTAMP) - unix_timestamp(time_field) AS timediff
  2. FROM TABLE_NAME;

Report this snippet


Comments


You need to login to view comments.