Browse Source

[svn r22364] Warning message avoided when multiple url feature available

Julio Montoya 15 years ago
parent
commit
d71710eee8
1 changed files with 16 additions and 7 deletions
  1. 16 7
      main/admin/session_list.php

+ 16 - 7
main/admin/session_list.php

@@ -119,6 +119,14 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
 			$and
 			ORDER BY $sort
 			LIMIT $from,".($limit+1);
+			
+	//query which allows me to get a record without taking into account the page
+	$query_rows= "SELECT count(*) as total_rows
+				FROM $tbl_session, $tbl_user
+				$where
+				$and
+				ORDER BY $sort";
+				
 	
 	//filtering the session list by access_url
 	if ($_configuration['multiple_access_urls']==true){
@@ -131,17 +139,18 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
 				$where
 				$and
 				ORDER BY $sort 
-				LIMIT $from,".($limit+1);			
-		}
-	}
-	
-	//query which allows me to get a record without taking into account the page
-	$query_rows= "SELECT count(*) as total_rows
-				FROM $tbl_session, $tbl_user
+				LIMIT $from,".($limit+1);
+				
+			$query_rows= "SELECT count(*) as total_rows
+				FROM $tbl_session, $tbl_user,$table_access_url_rel_session
 				$where
 				$and
 				ORDER BY $sort";
+		}
+	}
 	
+
+
 	$result_rows = api_sql_query($query_rows,__FILE__,__LINE__);
 	$recorset = Database::fetch_array($result_rows);
 	$num = $recorset['total_rows'];