Theoretically, that should work ... but ... This alternative that should give you the desired effect.
SELECT , idRAND() AS r
FROM textmessages
ORDER BY r;
This assumes that id is a number of somesort that is assigned to each message - if you don't have an id field, but have another number field, you can use that one.