Jelajahi Sumber

Improve image sorting

k4be 1 tahun lalu
induk
melakukan
3e546b61e9
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      include/db.php

+ 1 - 1
include/db.php

@@ -116,7 +116,7 @@ function get_dir_images($dir) {
 	global $pdo;
 	$images = [];
 
-	$sql = 'SELECT images.id, images.name, images.comment, images.views, images.likes, images.tags, images.path, dirs.name AS dir_name, dirs.comment AS dir_comment, dirs.views AS dir_views, dirs.likes AS dir_likes, dirs.tags AS dir_tags, dirs.path AS dir_path FROM images INNER JOIN dirs ON dirs.id=images.dir WHERE dirs.path = :path ORDER BY images.date ASC';
+	$sql = 'SELECT images.id, images.name, images.comment, images.views, images.likes, images.tags, images.path, dirs.name AS dir_name, dirs.comment AS dir_comment, dirs.views AS dir_views, dirs.likes AS dir_likes, dirs.tags AS dir_tags, dirs.path AS dir_path FROM images INNER JOIN dirs ON dirs.id=images.dir WHERE dirs.path = :path ORDER BY images.date ASC, images.path ASC';
 	$values = array(
 		':path' => $dir
 	);