-1

I have a situation, where in column 'starttime' has unix timestamp stored.

Now, I want to select only those records where:

currentTime = time(); // unix timestamp
currentTime >= startTime && currentTime <= (starttime + x)

Where x is dynamic range of some seconds.

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
Saurin Dashadia
  • 1,140
  • 11
  • 25

1 Answers1

0

as I get form your question, what you need to do is

select * from table where xfield > UNIX_TIMESTAMP() and xfield <= SUM(UNIX_TIMESTAMP(),x);
Nagy Wesley
  • 111
  • 2
  • 11
  • Thanks for your answer, However I want something like: xfield > UNIX_TIMESTAMP() and UNIX_TIMESTAMP() <= SUM(xfield,x) is this possible? – Saurin Dashadia May 02 '19 at 06:05