12-07-2009, 07:50 PM
|
#3 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
mysql Code:
SELECT one, two, three FROM `table` WHERE date_field >= DATE_SUB( NOW(), INTERVAL -3 minute ) LIMIT 3
The limit is optional of course, you could easily pull everything from that range and see how many rows you got in total. Or you could leave the date functionality out and just pull the last three rows, and check their timestamps. Or you could always do the date arithmetic on the PHP side too... and you could... well there's almost 50 or so options for how to do this. I think Salathe is on the right track, where are you at with it?
|
|
|
|