<?php
defined('BASEPATH') OR exit('No direct script access allowed');

//Validaciones para el modelo de usuarios
class Cat_planta_lib {

	public function __construct(){
		$this->CI =& get_instance();//para acceder a la instancia que carga la libreria
	}

	public function norep($registro){
		$this->CI->db->where('codigo',$registro['codigo']);
		$query = $this->CI->db->get('cat_planta');

		if ($query->num_rows() > 0 AND (!isset($registro['pk_cat_planta']) OR ($registro['pk_cat_planta'] != $query->row('pk_cat_planta')))) 
			return FALSE;
		else
			return TRUE;
	}

}

?>