Bug #1455 [Opn->Asn]: Download statistics do not agree with graph
| From: | danielc at analysisandsolutions dot com | Date: | Wed, 11 Aug 2004 16:07:11 +0000 |
| Subject: | Bug #1455 [Opn->Asn]: Download statistics do not agree with graph | ||
| References: | 1 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-2952@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=1455&edit=1
ID: 1455
Updated by: danielc@analysisandsolutions.com
Reported By: klaus at capitalfocus dot org
-Status: Open
+Status: Assigned
Type: Bug
Package: Web Site
PHP Version: Irrelevant
-Assigned To:
+Assigned To: mj
New Comment:
This probably has to do with the package_stats and downloads tables
being out of synch. Below is a script that can get them in line.
Martin will have the various permissions needed to run it, so I'm
foisting this off onto him.
<?php
require_once 'DB.php';
$db =& DB::connect('mysql://pear:pear@localhost/pear');
$db->setFetchMode(DB_FETCHMODE_ASSOC);
$db->query('lock tables downloads write, package_stats write');
$res =& $db->query('select release, count(*) as quant
from downloads group by release');
while ($res->fetchInto($row)) {
echo implode(' ', $row) . "<br />\n";
$db->query('update package_stats set dl_number = '
. $row['quant']
. ' where rid = ' . $row['release']);
}
$db->query('unlock tables');
?>
Previous Comments:
------------------------------------------------------------------------
[2004-06-13 01:30:33] aidan at virtualexplorer dot com dot au
Looking at a bunch of download statistics for different packages,
there's some huge discrepencies.
Here for example:
http://pear.php.net/package-stats.php?pid=338
Total downloads: 550, June downloads: 750.
------------------------------------------------------------------------
[2004-05-21 12:25:34] klaus at capitalfocus dot org
The difference seems to be precisely 2. (Graph = downloads + 2).
However, this does not occur on all packages (e.g., the latest release
of HTML_Progress does not display this discrepancy)
------------------------------------------------------------------------
[2004-05-20 11:24:39] klaus at capitalfocus dot org
Description:
------------
Package download statistics does not agree with graph. See this
example:
http://pear.php.net/package-stats.php?cid=10&pid=233&rid=1401
Have no idea what's going on there.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=1455&edit=1