The following code displays random database images as well as one specific image (which is what I want). How can I shuffle these results after database query as image ID 11
You can shuffle them after they are retrieved to php.
$photos = array();
while ($get_photo = mysql_fetch_array($photo))
$photos[] = $get_photo;
shuffle($photos);
Or you can do it with subqueries:
SELECT A.* FROM (
SELECT * FROM `profile_images`
ORDER BY (ID = 11) DESC, RAND()
LIMIT 7
) as A
ORDER BY RAND()