anyone knows how could I write the following query on an older version of MySQL (older than 5.5.6+), thanks.
CREATE PROCEDURE `getweekact`(userid int(10), topVal int(4))
BEGIN
SELECT uniqueid, firstname, lastname, clock FROM users, act
WHERE users.uniqueid = act.act_uniqueid
AND clock >= DATE_SUB(CURDATE(), INTERVAL 8 DAY)
GROUP BY uniqueid
ORDER BY clock DESC
LIMIT topVal;
END;