<?php
class Groups extends Zend_Db_Table_Abstract {
	protected $_name = 'iso_groups';
	protected $_primary = 'id_group';
	
	
	public function getGroupsForSelect($avoid = null)
	{
		$rows = $this->fetchAll();
		
		if (!is_array($avoid)) $avoid = array();
		
		$select = array();
		
		foreach ($rows as $i) {
			if (!in_array($i->id_group, $avoid)) {
				$select[$i->id_group] = $i->group_name;
			}
		}
		
		return $select;
		
	}
}
?>