From 33a765ef039552f7ecbd3cfe8b028df98f840f90 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 25 Apr 2011 23:23:02 -0500 Subject: stats: capitalize FROM in all SQL queries Matches our normal code conventions. Signed-off-by: Dan McGee Signed-off-by: Lukas Fleischer --- web/lib/stats.inc | 12 ++++++------ 1 file 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'); -- cgit v1.2.3-70-g09d2