SQL trick for ordering randomly by using NEWID()
This is a simple trick when you need to pull a query and order the records randomly.
SELECT TOP 1 *
FROM tblProducts
ORDER BY NEWID()
</cfquery>
This code gets one random product from my database.
This is a simple trick when you need to pull a query and order the records randomly.
This code gets one random product from my database.