Merge pull request #1305 from AndreasK79/search_fix_for_table_not_specified
[Advanced Search] This fix adds table name to column so that query do…
这个提交包含在:
		
						当前提交
						e044da8df0
					
				
					共有  1 个文件被更改,包括 4 次插入 和 1 次删除
				
			
		|  | @ -149,7 +149,6 @@ class Search extends CI_Controller { | ||||||
| 			if(is_array($value)) { | 			if(is_array($value)) { | ||||||
| 				foreach($value as $values) | 				foreach($value as $values) | ||||||
| 				{ | 				{ | ||||||
| 
 |  | ||||||
| 					if(isset($values['rules'])) { | 					if(isset($values['rules'])) { | ||||||
| 						if($values['condition'] == "AND") { | 						if($values['condition'] == "AND") { | ||||||
| 							$this->db->group_start(); | 							$this->db->group_start(); | ||||||
|  | @ -158,6 +157,8 @@ class Search extends CI_Controller { | ||||||
| 						} | 						} | ||||||
| 						foreach($values['rules'] as $group_value) | 						foreach($values['rules'] as $group_value) | ||||||
| 						{ | 						{ | ||||||
|  | 							$group_value['field'] = $this->config->item('table_name') . '.' . $group_value['field']; | ||||||
|  | 
 | ||||||
| 							if($group_value['operator'] == "equal") { | 							if($group_value['operator'] == "equal") { | ||||||
| 								if($values['condition'] == "AND") { | 								if($values['condition'] == "AND") { | ||||||
| 									$this->db->where($group_value['field'], $group_value['value']); | 									$this->db->where($group_value['field'], $group_value['value']); | ||||||
|  | @ -267,6 +268,8 @@ class Search extends CI_Controller { | ||||||
| 						$this->db->group_end(); | 						$this->db->group_end(); | ||||||
| 					} else { | 					} else { | ||||||
| 						//print_r($values['field']);
 | 						//print_r($values['field']);
 | ||||||
|  | 						$values['field'] = $this->config->item('table_name') . '.' . $values['field']; | ||||||
|  | 
 | ||||||
| 						if(isset($values['operator'])) { | 						if(isset($values['operator'])) { | ||||||
| 
 | 
 | ||||||
| 						} | 						} | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用