logo       

cvs: pearweb /include pear-database.php: msg#00054

php.pear.core

Subject: cvs: pearweb /include pear-database.php

cellog Wed Oct 18 19:07:12 2006 UTC

Modified files:
/pearweb/include pear-database.php
Log:
fix getPopular() query - it must not have upgraded properly when
testing the last fix

http://cvs.php.net/viewvc.cgi/pearweb/include/pear-database.php?r1=1.318&r2=1.319&diff_format=u
Index: pearweb/include/pear-database.php
diff -u pearweb/include/pear-database.php:1.318
pearweb/include/pear-database.php:1.319
--- pearweb/include/pear-database.php:1.318 Wed Oct 18 18:17:35 2006
+++ pearweb/include/pear-database.php Wed Oct 18 19:07:12 2006
@@ -18,7 +18,7 @@
| Martin Jansen <mj@xxxxxxx> |
| Gregory Beaver <cellog@xxxxxxx> |
+----------------------------------------------------------------------+
- $Id: pear-database.php,v 1.318 2006/10/18 18:17:35 cellog Exp $
+ $Id: pear-database.php,v 1.319 2006/10/18 19:07:12 cellog Exp $
*/

require_once 'DB/storage.php';
@@ -1565,8 +1565,7 @@
$sth = $dbh->limitQuery('
SELECT
packages.name, releases.version,
- SUM(downloads)/
- ((unix_timestamp(NOW()) -
unix_timestamp(MAX(releases.releasedate))/86400) as d
+ SUM(downloads)/((unix_timestamp(NOW()) -
unix_timestamp(MAX(releases.releasedate)))/86400) as d
FROM releases, packages, aggregated_package_stats a
WHERE
packages.id = releases.package AND



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise