$result=dbquery( "SELECT ta.album_id,album_title,photo_id,photo_title,photo_description,photo_thumb1 FROM ".DB_PHOTO_ALBUMS." ta INNER JOIN ".DB_PHOTOS." USING (album_id) WHERE ".groupaccess('album_access')." ORDER BY RAND() LIMIT ".$set_data['slideshow_items']."" );