это код, который я использую сейчас, однако результаты хорошие, но когда я их получаю, он показывает что-то вроде
Engine_Db_Table_Rowset Object ( [_rowClass:protected] => Engine_Db_Table_Row [_rowsetClass:protected] => Engine_Db_Table_Rowset [_data:protected] => Array ( [0] => Array ( [poll_option_id] => 108 [gender] => male [count] => 1 ) ) [_table:protected] => Poll_Model_DbTable_Votes Object ( [_rowClass:protected]
foreach ($this->pollOptions as $i => $option_chart_f):
$table = Engine_Api::_()->poll()->api()->getDbtable('votes', 'poll');
$select = $table->select()
->from($table->info('name'), array(
'poll_option_id','gender',
new Zend_Db_Expr('COUNT(gender) as count'),
))
->where('poll_id = ?', $option_chart_f->poll_id)
->where('poll_option_id =?', $option_chart_f->poll_option_id)
->group('poll_option_id')
->group('gender');
$rows = $table->fetchAll($select);
print_r($rows);
endforeach;
Спасибо