<?php

class Model_DbTable_MatchOfficialPositions extends Zend_Db_Table
{
    
    protected $_name = "match_officials";
    
    public function getPos($code)
    {
        $select = $this->select();
        $select->from(array('U'=>$this->_name));
        $select->where("RugbyCode='".$code."'");
        $select->setIntegrityCheck(false);
        return $this->fetchAll($select); 
    }
		
		public function getAll()
    {
        $select = $this->select();
        $select->from(array('U'=>$this->_name))->order("Position ASC");
        $select->setIntegrityCheck(false);
        return $this->fetchAll($select); 
    }
		
		public function getRow($pos)
    {
        $select = $this->select();
        $select->from(array('U'=>$this->_name));
        $select->setIntegrityCheck(false);
				$select->where("PID ='".$pos."'");
        return $this->fetchRow($select); 
    }
    
}