<?php

class Produto_Model_Validacoesgrupoportaenxerto extends Agro_Db_Table_Abstract {
	protected $_schema = 'produto';
	protected $_name = 'validacoes_grupo_portaenxerto_portaenxertos';
	protected $_primary = array('id_portaenxerto', 'id_grupo_portaenxerto');
	public $_paginator = false;

	
	public function getDataMultiChecks($where) {
		$select = $this->getData($where);
		$Rs = $this->fetchRow($select);
		return $Rs;
	}

	public function removePortaEnxerto($id) {
		try {
			$sql = "delete from produto.validacoes_grupo_portaenxerto_portaenxertos where id_portaenxerto = $id";
			$this->_db->query($sql);
			//se deu pau, azar :-p
		} catch(Exception $e) {}
	}
	public function removeAll($id_grupo_portaenxerto) {
		$sql = "delete from produto.validacoes_grupo_portaenxerto_portaenxertos where id_grupo_portaenxerto = $id_grupo_portaenxerto";
		$this->_db->query($sql);
	}
}