SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GROUP BY c.card_number ORDER BY c.id DESC' at line 4
#0 [internal function]: PDO->query('SELECT max(id) ...')
#1 /var/www/new.club/public_html/app/controllers/ProfileController.php(33): Phalcon\Db\Adapter\Pdo->query('SELECT max(id) ...')
#2 [internal function]: Club\Controllers\ProfileController->cardsAction()
#3 [internal function]: Phalcon\Dispatcher->callActionMethod(Object(Club\Controllers\ProfileController), 'cardsAction', Array)
#4 [internal function]: Phalcon\Dispatcher->_dispatch()
#5 [internal function]: Phalcon\Dispatcher->dispatch()
#6 /var/www/new.club/public_html/public/index.php(48): Phalcon\Mvc\Application->handle()
#7 {main}