I have a query that gets 5 random values out of a table according to a query. i.e.
SELECT * FROM links WHERE url contra = FALSE ORDER BY rand() LIMIT 0,5
This is fairly simplified but you get the idea. One of the fields in the table is ip, how can I do that same but ensure that all the ip values are DISTINCT. Any ideas anybody?