diff options
-rw-r--r-- | picture.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/picture.php b/picture.php index e0af0b062..570bf6dc4 100644 --- a/picture.php +++ b/picture.php @@ -96,9 +96,9 @@ else } $query = ' -SELECT * - FROM '.IMAGES_TABLE.' - INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=ic.image_id +SELECT DISTINCT(i.id), i.* + FROM '.IMAGES_TABLE.' AS i + INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id = ic.image_id '.$page['where'].' '.$conf['order_by'].' '; |