mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 23:05:18 -04:00
Remove an useless ORDER BY.
It improves compatibility with PgSQL.
This commit is contained in:
@@ -382,8 +382,7 @@ class Item_Model extends ORM_MPTT {
|
||||
SELECT COUNT(*) AS position FROM {items}
|
||||
WHERE parent_id = {$this->id}
|
||||
AND {$this->sort_column} <= (SELECT {$this->sort_column}
|
||||
FROM {items} WHERE id = $child_id)
|
||||
ORDER BY {$this->sort_column} {$this->sort_order}");
|
||||
FROM {items} WHERE id = $child_id)");
|
||||
|
||||
return $result->current()->position;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user