Realizing that using Rand in order by is a bad habit. Two questions:
1. What is the best way to get random records?
2. In the query below RAND() is not producing random results but sorts the results in some manor.
Here is the URL:
https://www.artcardsforcauses.com/ga....php?artists=0
SELECT *, country_art
FROM image_img
LEFT JOIN label ON id_lbl=(theme_img
OR style_img
OR medium_img
OR season_img)
LEFT JOIN artist_art On artist_img=user_art
WHERE approvedIMG=1
AND (private_img <>1
OR `private_img`IS NULL )
AND ((0 =0)
OR (artist_img = 0))
ORDER BY CASE
WHEN artist_img=0 Then RAND()
WHEN artist_img=0 Then cdates_img
END
Thanks
Nick