/** * Check is the value is unique * * @param mixed $Str * @return mixed */ public function rule_unique($str, $field) { $Query = $this->Object->db->select($this->Object->_id())->where($field, $str)->get($this->Object->_table()); //$SQL = 'SELECT '.$this->Object->_id().' FROM '.$this->Object->_table().' WHERE '.$field.'='.$this->Object->db->escape($str); //$Query = $this->Object->db->query($SQL); return $Query->num_rows() == 0; }
function saveSettings() { $Save['sortedBy'] = $this->sortedBy; $this->ci->session->set_flashdata($this->Obj->_table(), $Save); return $this; }