Show random post?

A better query :wink:

SELECT * 
FROM topics
WHERE category_id BETWEEN 5 AND 8
ORDER BY random()
LIMIT 1