How do I select wallpapers randomly, but cache the last selected one for 10 seconds (for performance reasons)?
the faster RAND() function use Cache in wallpapers or image I use this but I need to but cache in image timely change after 1 mins or 5 mins to change images in RAND() randoms wallpapers
i use this :
$sql_wallpaper = "SELECT SQL_CACHE * FROM `wallpaper`
WHERE wallpaperid >=
(SELECT FLOOR( MAX(wallpaperid) * RAND()) FROM `wallpaper` )
ORDER BY wallpaperid LIMIT 0,7";
but i think its not faster ... It's not using the cache