Fix query for fetching latest collection files
This commit is contained in:
parent
98fc8cad30
commit
76cf4234d2
|
@ -589,8 +589,8 @@ class FilesDB {
|
||||||
(
|
(
|
||||||
SELECT $columnCollectionID, MAX($columnCreationTime) AS max_creation_time
|
SELECT $columnCollectionID, MAX($columnCreationTime) AS max_creation_time
|
||||||
FROM $table
|
FROM $table
|
||||||
|
WHERE ($columnCollectionID IS NOT NULL AND $columnCollectionID IS NOT -1)
|
||||||
GROUP BY $columnCollectionID
|
GROUP BY $columnCollectionID
|
||||||
WHERE $columnCollectionID IS NOT -1
|
|
||||||
) latest_files
|
) latest_files
|
||||||
ON $table.$columnCollectionID = latest_files.$columnCollectionID
|
ON $table.$columnCollectionID = latest_files.$columnCollectionID
|
||||||
AND $table.$columnCreationTime = latest_files.max_creation_time;
|
AND $table.$columnCreationTime = latest_files.max_creation_time;
|
||||||
|
|
Loading…
Reference in a new issue