소스 검색

Contacts oder by last mod date null last.

markjcrane 10 년 전
부모
커밋
a7ccd05433
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      contacts.php

+ 1 - 1
contacts.php

@@ -178,7 +178,7 @@ else {
 		$sql .= "order by ".$order_by." ".$order." ";
 	}
 	else {
-		$sql .= "order by last_mod_date desc ";
+		$sql .= "order by case when last_mod_date is null then 1 else 0, last_mod_date desc ";
 	}
 	$sql .= "limit ".$rows_per_page." offset ".$offset." ";
 	$prep_statement = $db->prepare(check_sql($sql));