<?php

class Model_DbTable_Ethnicity extends Zend_Db_Table
{
    protected $_name = 'Ethnicity';
    
   public function insertData($data)
    {
       
       try{
           $id = $this->insert($data);
           return $id;
       }catch(Exception $e){
          return  false;
       }
       
    }
    
 	public function updateData($data,$id)
    {
       
       try{
           $this->update($data,"EthnicityID ='".$id."'");
           return $id;
       }catch(Exception $e){
          return  false;
       }
       
    }	
     
   public function getAll()
    {
       $select = $this->select();
            $select->from(array('t' => $this->_name))->where("EthCountry ='South Africa'")->order("EthnicityName ASC");
               
            $select->setIntegrityCheck(false);
            return $this->fetchAll($select);
    }  
    
    
}