I want to search a db column for the highest value and return it.
I tried:
$sql = R::exec('SELECT MAX(featured_order_id) FROM ads');
But no luck.
There is another (working) piece of code in the same function that looks like:
$count = R::count('ads', " featured_order_id=$order_id ", array('featured_order_id'=>$order_id));
Do I need to follow this pattern?