Order by primary key as second criterion
这个提交包含在:
		
							父节点
							
								
									27ac864a44
								
							
						
					
					
						当前提交
						d10a070ec3
					
				
					共有  2 个文件被更改,包括 4 次插入 和 3 次删除
				
			
		|  | @ -1113,6 +1113,7 @@ class Logbook_model extends CI_Model { | ||||||
|     $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); |     $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); | ||||||
|     $this->db->where_in('station_profile.station_id', $logbooks_locations_array); |     $this->db->where_in('station_profile.station_id', $logbooks_locations_array); | ||||||
|     $this->db->order_by(''.$this->config->item('table_name').'.COL_TIME_ON', "desc"); |     $this->db->order_by(''.$this->config->item('table_name').'.COL_TIME_ON', "desc"); | ||||||
|  |     $this->db->order_by(''.$this->config->item('table_name').'.COL_PRIMARY_KEY', "desc"); | ||||||
| 
 | 
 | ||||||
|     $this->db->limit($num); |     $this->db->limit($num); | ||||||
|     $this->db->offset($offset); |     $this->db->offset($offset); | ||||||
|  | @ -1179,7 +1180,7 @@ class Logbook_model extends CI_Model { | ||||||
|        |        | ||||||
|       $sql = "SELECT * FROM ( select * from " . $this->config->item('table_name'). " |       $sql = "SELECT * FROM ( select * from " . $this->config->item('table_name'). " | ||||||
|         WHERE station_id IN(". $location_list .") |         WHERE station_id IN(". $location_list .") | ||||||
|         order by col_time_on desc |         order by col_time_on desc, col_primary_key desc | ||||||
|         limit " . $num .
 |         limit " . $num .
 | ||||||
|         ") hrd
 |         ") hrd
 | ||||||
|         JOIN station_profile ON station_profile.station_id = hrd.station_id |         JOIN station_profile ON station_profile.station_id = hrd.station_id | ||||||
|  |  | ||||||
|  | @ -91,7 +91,7 @@ class Logbookadvanced_model extends CI_Model { | ||||||
| 			INNER JOIN station_profile ON qsos.station_id=station_profile.station_id | 			INNER JOIN station_profile ON qsos.station_id=station_profile.station_id | ||||||
| 			WHERE station_profile.user_id =  ? | 			WHERE station_profile.user_id =  ? | ||||||
| 			$where | 			$where | ||||||
| 			ORDER BY qsos.COL_TIME_ON desc | 			ORDER BY qsos.COL_TIME_ON desc, qsos.COL_PRIMARY_KEY desc | ||||||
| 			LIMIT $limit | 			LIMIT $limit | ||||||
| 		";
 | 		";
 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用