The website contains images. These images can be ranked. When an image is ranked, the value can be 1,2, or 3. To save ranking I have a table ranking_items
. The images are displayed as thumbnails. The boss would like me to order them by rank. the problem is, how do I also include images in the result with no entry in the ranking_items
?
$db->query("SELECT file_name
FROM images, ranking_items
WHERE images.id=ranking_items.image_id
ORDER BY ranking_items.rank ASC");