dbprefix}koolielu_polls ORDER BY time DESC"); $old_polls = array(); foreach($all_polls as $poll) { $poll_id = $poll->ID; $poll_answers = get_data("SELECT * FROM {$CONFIG->dbprefix}koolielu_polls_answers WHERE poll_id=$poll_id"); if ((is_array($poll_answers) && count($poll_answers) > 0) || ($poll->isActive == 1)) { array_push($old_polls, $poll); } } /*translation:Poll*/ $polls_body = "