소스 검색

Minor - Add comment on weird query - refs BT#9092

Yannick Warnier 10 년 전
부모
커밋
323a6c8e06
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      main/inc/lib/sessionmanager.lib.php

+ 2 - 0
main/inc/lib/sessionmanager.lib.php

@@ -5231,6 +5231,8 @@ class SessionManager
         $sessionId = intval($sessionId);
         $userId = intval($userId);
 
+        // COUNT(1) actually returns the number of rows from the table (as if
+        // counting the results from the first column)
         $sql = "SELECT COUNT(1) AS qty FROM $sessionRelUserTable "
             . "WHERE id_session = $sessionId AND id_user = $userId AND relation_type = 0";