summaryrefslogtreecommitdiffstats
path: root/web/lib/stats.inc
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-25 23:23:02 -0500
committerLukas Fleischer <archlinux@cryptocrack.de>2011-04-27 14:50:28 +0200
commit33a765ef039552f7ecbd3cfe8b028df98f840f90 (patch)
tree0bac88a908a7a171a5ee8b8c5581eb972b8fa289 /web/lib/stats.inc
parent3609cf140eaca30878d0a69fba0d837b4fec41a0 (diff)
downloadaurweb-33a765ef039552f7ecbd3cfe8b028df98f840f90.tar.xz
stats: capitalize FROM in all SQL queries
Matches our normal code conventions. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/stats.inc')
-rw-r--r--web/lib/stats.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/web/lib/stats.inc b/web/lib/stats.inc
index 75b2537..756fa27 100644
--- a/web/lib/stats.inc
+++ b/web/lib/stats.inc
@@ -80,25 +80,25 @@ function general_stats_table($dbh)
$q = "SELECT count(*) FROM Packages WHERE MaintainerUID IS NULL";
$orphan_count = db_cache_value($q, $dbh, $apc_prefix . 'orphan_count');
- $q = "SELECT count(*) from Users";
+ $q = "SELECT count(*) FROM Users";
$user_count = db_cache_value($q, $dbh, $apc_prefix . 'user_count');
- $q = "SELECT count(*) from Users,AccountTypes WHERE Users.AccountTypeID = AccountTypes.ID AND AccountTypes.AccountType = 'Trusted User'";
+ $q = "SELECT count(*) FROM Users,AccountTypes WHERE Users.AccountTypeID = AccountTypes.ID AND AccountTypes.AccountType = 'Trusted User'";
$tu_count = db_cache_value($q, $dbh, $apc_prefix . 'tu_count');
$targstamp = intval(strtotime("-7 days"));
$yearstamp = intval(strtotime("-1 year"));
- $q = "SELECT count(*) from Packages WHERE Packages.ModifiedTS >= $targstamp AND Packages.ModifiedTS = Packages.SubmittedTS";
+ $q = "SELECT count(*) FROM Packages WHERE Packages.ModifiedTS >= $targstamp AND Packages.ModifiedTS = Packages.SubmittedTS";
$add_count = db_cache_value($q, $dbh, $apc_prefix . 'add_count');
- $q = "SELECT count(*) from Packages WHERE Packages.ModifiedTS >= $targstamp AND Packages.ModifiedTS != Packages.SubmittedTS";
+ $q = "SELECT count(*) FROM Packages WHERE Packages.ModifiedTS >= $targstamp AND Packages.ModifiedTS != Packages.SubmittedTS";
$update_count = db_cache_value($q, $dbh, $apc_prefix . 'update_count');
- $q = "SELECT count(*) from Packages WHERE Packages.ModifiedTS >= $yearstamp AND Packages.ModifiedTS != Packages.SubmittedTS";
+ $q = "SELECT count(*) FROM Packages WHERE Packages.ModifiedTS >= $yearstamp AND Packages.ModifiedTS != Packages.SubmittedTS";
$update_year_count = db_cache_value($q, $dbh, $apc_prefix . 'update_year_count');
- $q = "SELECT count(*) from Packages WHERE Packages.ModifiedTS = Packages.SubmittedTS";
+ $q = "SELECT count(*) FROM Packages WHERE Packages.ModifiedTS = Packages.SubmittedTS";
$never_update_count = db_cache_value($q, $dbh, $apc_prefix . 'never_update_count');
include('stats/general_stats_table.php');