Ok, let\'s say I have a table with photos.
What I want to do is on a page display the photo based on the id in the URI. Bellow the photo I want to have 10 thumbnails
Try union all instead. Union requires the server to ensure that the results are unique and this conflicts with your ordering.