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;
SELECT *
FROM (
SELECT *, @id := (@id + 1) AS id
FROM controller
WHERE timestamp > $starttime
ORDER BY timestamp
LIMIT 100
) AS intermediate
WHERE NOT (id MOD 5);
in order to get rows back. "NOT id % 5" gave me a null set. But thanks a lot! That really helps.
Miranda