Hi 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 chnage 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 ... Need to use cache help me