getMessage()); } try { $check_totals = R::getAll(" SELECT to_char(date_checked, 'yyyy-mm') AS yymm, total_users AS users FROM monthlystats GROUP BY yymm, users ORDER BY yymm "); } catch (\RedBeanPHP\RedException $e) { die('Error in SQL query: ' . $e->getMessage()); } ?>