help with mysql query: return nth rows in query
Hi,
I am trying to write a query in sql using a MySQL database that returns every nth row. The table contains the unit timestamp and some data taken at that time. I have a query that read something like Code:
SELECT * FROM controller WHERE timestamp > $starttime LIMIT 100 Thanks! Miranda |
The following seems to work:
Code:
SET @id := 0; |
Great! Thanks a bunch. Not sure why it would matter, since the docs claim that all three syntaxes (MOD(N,M), N % M, N MOD M) work, but I had to make the following change:
Code:
SET @id := 0; Miranda |
All times are GMT -5. The time now is 03:44 AM. |