4
Since this subject has already been brought up here, I'll add another comment.
Another restriction of the Critera class is that it doesn't allow multiple specifications for the ORDER BY clause. For example: "ORDER BY col1 ASC, col2 DESC"
Maybe bingomanatee's patch addresses that, but it doesn't look like it.
This could be handled by changing
var $order = 'ASC';
var $sort = '';
to an array:
var $order_by = array();
The elements of the array would each be two-element arrays. The example "ORDER BY col1 ASC, col2 DESC" would be represented as:
$order_by = array(
array('col_name' => 'col1', 'asc' => true),
array('col_name' => 'col2', 'asc' => false),
);
If the new variable $order_by is added, and the old variables $order and $sort kept, downward-compatibility could be achieved.