I used the example below to order the results in my Table however the orderby variable doesn't seem to effect the order of results. I can't get access to the underlying SQL Query to see what RedBean is doing and I have checked and $sortorder and $sort are the correct values.
$needles = R::find('needle',
' haystack = :haystack ORDER BY :sortorder :sort',
array(
':sort' => $sort
':sortorder'=>$sortorder,
':haystack'=>$haystack
)
);
But, you can easily prepare your query string before :
$query = sprintf('ORDER BY %s %s LIMIT :size', $column, $sortOrder);
$items = R::find(
'item',
$query,
array(
'size' => (int) $size
)
);