<?php
require_once(dirname(__FILE__).'/autoload.php');
protegeArquivo(basename(__FILE__));
class transmitancia extends base{
	public function __construct($campos=array()){
		parent::__construct();
		//$this->tabela = "paineladm_usuarios";
		$this->tabela = "transmitancia";
		if(sizeof($campos)<=0):
			$this->campos_valores = array(
				"nomelabo" => NULL,
				"id" => NULL,
				"id_lab" => NULL,
				"codigo" => NULL,
				"c1" => NULL,
				"c2" => NULL,
				"c3" => NULL,
				"c4" => NULL,
				"c5" => NULL,
				"c6" => NULL,
				"c7" => NULL,
				"c8" => NULL,
				"c9" => NULL,
				"c10" => NULL,
				"a1" => NULL,
				"a2" => NULL,
				"a3" => NULL,
				"a4" => NULL,
				"a5" => NULL,
				"a6" => NULL,
				"a7" => NULL,
				"a8" => NULL,
				"a9" => NULL,
				"a10" => NULL,
				"a" => NULL,
				"b" => NULL,

			);
		else:
			$this->campos_valores = $campos;
		endif;
		$this->campopk = "id";
	}
    
  
    public function existeRegistro($campo=NULL,$valor=NULL){
        if ($campo!=NULL && $valor!=NULL):
            is_numeric($valor) ? $valor = $valor : $valor = "'".$valor."'";
            $this->extras_select = "WHERE $campo=$valor";
            $this->selecionaTudo($this);
            if ($this->linhasafetadas > 0):
                return TRUE;
            else:
                return FALSE;
            endif;
        else:
            $this->trataerro(__FILE__,__FUNCTION__,NULL,'Faltam parâmetros para executar a função',TRUE);
        endif;
    }
}
?>