I have a query to count all rows in Db table.
$results = $db->fetchAll('select count(id) as total_keys, sum(if(used,1,0)) as used_keys from product_keys');
$this->_helper->flashMessenger->addMessage($results);
I want to get the total_keys and used_keys, but it doesn't seen to work.