load->database(); $this->load->helper('common_helper'); $this->nepaliDateObject = new NepaliDate(); $this->nepali_current_date = cuurentNepaliDate($this->nepaliDateObject); } public function get_unique_name($field_name, $field_value, $table_name) { $sql_query = "select * from " . $table_name . " WHERE " . $field_name . " = '" . $field_value . "'"; $query = $this->db->query($sql_query); $results = $query->result_array(); if (empty($results)) { return true; } else { return false; } } }