Remove an useless ORDER BY.

It improves compatibility with PgSQL.
This commit is contained in:
Romain LE DISEZ
2009-06-23 10:09:46 +02:00
parent 2e6a1d6fdc
commit c80d2da0a9
+1 -2
View File
@@ -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;
}