From 01eb0ac9b9fee6753df20a383980abda946e29d3 Mon Sep 17 00:00:00 2001 From: Kaldari Date: Fri, 18 Dec 2015 14:48:40 -0700 Subject: [PATCH] Add more documentation to SpecialGadgetUsage::getQueryInfo() Change-Id: I69dacb13034dd051534ff9d3700597f778f5bcb1 --- SpecialGadgetUsage.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SpecialGadgetUsage.php b/SpecialGadgetUsage.php index 34abe268..3208cda3 100644 --- a/SpecialGadgetUsage.php +++ b/SpecialGadgetUsage.php @@ -50,7 +50,16 @@ class SpecialGadgetUsage extends QueryPage { } /** - * SQL Query being used: + * Define the database query that is used to generate the stats table. + * This uses 1 of 2 possible queries, depending on $wgSpecialGadgetUsageActiveUsers. + * + * The simple query is essentially: + * SELECT up_property, SUM(up_value) + * FROM user_properties + * WHERE up_property LIKE 'gadget-%' + * GROUP BY up_property; + * + * The more expensive query is: * SELECT up_property, SUM(up_value), count(qcc_title) * FROM user_properties * LEFT JOIN user ON up_user = user_id