Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin/check_stats.php
diff options
context:
space:
mode:
Diffstat (limited to 'bin/check_stats.php')
-rw-r--r--bin/check_stats.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/check_stats.php b/bin/check_stats.php
index 0243c21..d3e1ea7 100644
--- a/bin/check_stats.php
+++ b/bin/check_stats.php
@@ -87,13 +87,13 @@ foreach ($addons as $addon_id => $addon_name) {
// DOWNLOADS
$date = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-2, date('Y')));
// Does download count from 2 days ago exist?
- $qry_2day = $db->read("SELECT count FROM download_counts WHERE date='{$date}' AND addon_id={$addon_id}");
+ $qry_2day = $db->query("SELECT count FROM download_counts WHERE date='{$date}' AND addon_id={$addon_id}");
if (mysql_num_rows($qry_2day) > 0) {
$count_2day = mysql_fetch_array($qry_2day);
output('PASS', "[Downloads] Count from 2 days ago ({$date}) exists: {$count_2day['count']}", $addon_name);
// Does that count have a 50% + or - difference from previous 2 counts?
- $qry_last2 = $db->read("SELECT date, count FROM download_counts WHERE addon_id={$addon_id} AND date < '{$date}' ORDER BY date DESC LIMIT 2");
+ $qry_last2 = $db->query("SELECT date, count FROM download_counts WHERE addon_id={$addon_id} AND date < '{$date}' ORDER BY date DESC LIMIT 2");
if (mysql_num_rows($qry_last2) > 0) {
while ($row = mysql_fetch_array($qry_last2)) {
$change = ceil(abs(($count_2day['count'] - $row['count']) / $row['count']) * 100);
@@ -115,13 +115,13 @@ foreach ($addons as $addon_id => $addon_name) {
$wed = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d')-3, date('Y')));
// Does update ping count from wednesday exist?
- $qry_wed = $db->read("SELECT count FROM update_counts WHERE date='{$wed}' AND addon_id={$addon_id}");
+ $qry_wed = $db->query("SELECT count FROM update_counts WHERE date='{$wed}' AND addon_id={$addon_id}");
if (mysql_num_rows($qry_wed) > 0) {
$count_wed = mysql_fetch_array($qry_wed);
output('PASS', "[Update Pings] Count from Wednesday ({$wed}) exists: {$count_wed['count']}", $addon_name);
// Does that count have a 50% + or - difference from previous 2 counts?
- $qry_last2 = $db->read("SELECT date, count FROM update_counts WHERE addon_id={$addon_id} AND date < '{$wed}' ORDER BY date DESC LIMIT 2");
+ $qry_last2 = $db->query("SELECT date, count FROM update_counts WHERE addon_id={$addon_id} AND date < '{$wed}' ORDER BY date DESC LIMIT 2");
if (mysql_num_rows($qry_last2) > 0) {
while ($row = mysql_fetch_array($qry_last2)) {
$change = ceil(abs(($count_wed['count'] - $row['count'])/ $row['count']) * 100);