From: Greg Sabino Mullane Date: Fri, 14 Jul 2006 19:48:22 +0000 (+0000) Subject: Change GROUP BY to standard SQL form by specifying all fields. X-Git-Tag: 1.31.0-rc.0~56247 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=5b5f413496c89ab720b66150bc65b5fdeed45029;p=lhc%2Fweb%2Fwiklou.git Change GROUP BY to standard SQL form by specifying all fields. --- diff --git a/includes/SpecialCategories.php b/includes/SpecialCategories.php index 8a6dd5ff13..89cff20a05 100644 --- a/includes/SpecialCategories.php +++ b/includes/SpecialCategories.php @@ -36,7 +36,7 @@ class CategoriesPage extends QueryPage { 1 as value, COUNT(*) as count FROM $categorylinks - GROUP BY cl_to"; + GROUP BY 1,2,3,4"; return $s; } diff --git a/includes/SpecialListusers.php b/includes/SpecialListusers.php index 20b26b6330..3c22e9da0a 100644 --- a/includes/SpecialListusers.php +++ b/includes/SpecialListusers.php @@ -132,7 +132,7 @@ class ListUsersPage extends QueryPage { "FROM $user ". "LEFT JOIN $user_groups ON user_id=ug_user " . $this->userQueryWhere( $dbr ) . - " GROUP BY user_name"; + " GROUP BY 1, 2, 3, 4, 5"; return $sql; } diff --git a/includes/SpecialMostcategories.php b/includes/SpecialMostcategories.php index 5591bbc47a..c0d662cc41 100644 --- a/includes/SpecialMostcategories.php +++ b/includes/SpecialMostcategories.php @@ -31,7 +31,7 @@ class MostcategoriesPage extends QueryPage { FROM $categorylinks LEFT JOIN $page ON cl_from = page_id WHERE page_namespace = " . NS_MAIN . " - GROUP BY cl_from + GROUP BY 1,2,3 HAVING COUNT(*) > 1 "; } diff --git a/includes/SpecialMostimages.php b/includes/SpecialMostimages.php index 30fbdddf15..09f7108863 100644 --- a/includes/SpecialMostimages.php +++ b/includes/SpecialMostimages.php @@ -29,7 +29,7 @@ class MostimagesPage extends QueryPage { il_to as title, COUNT(*) as value FROM $imagelinks - GROUP BY il_to + GROUP BY 1,2,3 HAVING COUNT(*) > 1 "; } diff --git a/includes/SpecialMostlinked.php b/includes/SpecialMostlinked.php index ccccc1a48c..1791228dde 100644 --- a/includes/SpecialMostlinked.php +++ b/includes/SpecialMostlinked.php @@ -37,7 +37,7 @@ class MostlinkedPage extends QueryPage { page_namespace FROM $pagelinks LEFT JOIN $page ON pl_namespace=page_namespace AND pl_title=page_title - GROUP BY pl_namespace,pl_title + GROUP BY 1,2,3,5 HAVING COUNT(*) > 1"; } diff --git a/includes/SpecialMostlinkedcategories.php b/includes/SpecialMostlinkedcategories.php index 0944d2f86c..5942b3f4ea 100644 --- a/includes/SpecialMostlinkedcategories.php +++ b/includes/SpecialMostlinkedcategories.php @@ -32,7 +32,7 @@ class MostlinkedCategoriesPage extends QueryPage { cl_to as title, COUNT(*) as value FROM $categorylinks - GROUP BY cl_to + GROUP BY 1,2,3 "; } diff --git a/includes/SpecialMostrevisions.php b/includes/SpecialMostrevisions.php index 81a49c9950..676923ae79 100644 --- a/includes/SpecialMostrevisions.php +++ b/includes/SpecialMostrevisions.php @@ -31,9 +31,9 @@ class MostrevisionsPage extends QueryPage { page_title as title, COUNT(*) as value FROM $revision - LEFT JOIN $page ON page_id = rev_page + JOIN $page ON page_id = rev_page WHERE page_namespace = " . NS_MAIN . " - GROUP BY rev_page + GROUP BY 1,2,3 HAVING COUNT(*) > 1 "; } diff --git a/includes/SpecialWantedcategories.php b/includes/SpecialWantedcategories.php index 8e75953af2..97bb0a261b 100644 --- a/includes/SpecialWantedcategories.php +++ b/includes/SpecialWantedcategories.php @@ -34,7 +34,7 @@ class WantedCategoriesPage extends QueryPage { FROM $categorylinks LEFT JOIN $page ON cl_to = page_title AND page_namespace = ". NS_CATEGORY ." WHERE page_title IS NULL - GROUP BY cl_to + GROUP BY 1,2,3 "; } diff --git a/includes/SpecialWantedpages.php b/includes/SpecialWantedpages.php index 8bbe49cb54..7b070604ea 100644 --- a/includes/SpecialWantedpages.php +++ b/includes/SpecialWantedpages.php @@ -46,7 +46,7 @@ class WantedPagesPage extends QueryPage { WHERE pg1.page_namespace IS NULL AND pl_namespace NOT IN ( 2, 3 ) AND pg2.page_namespace != 8 - GROUP BY pl_namespace, pl_title + GROUP BY 1,2,3 HAVING COUNT(*) > $count"; }