cvs: php-bugs-web / bugstats.php

From: Date: Sat, 20 Oct 2001 06:11:53 +0000
Subject: cvs: php-bugs-web / bugstats.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-7115@lists.php.net to get a copy of this message
jimw Sat Oct 20 02:11:53 2001 EDT Modified files: /php-bugs-web bugstats.php Log: oops, forgot to take versions into account Index: php-bugs-web/bugstats.php diff -u php-bugs-web/bugstats.php:1.4 php-bugs-web/bugstats.php:1.5 --- php-bugs-web/bugstats.php:1.4 Sat Oct 20 02:08:15 2001 +++ php-bugs-web/bugstats.php Sat Oct 20 02:11:53 2001 @@ -141,10 +141,18 @@ echo "</table>\n"; $query = "SELECT COUNT(*) AS count,MAX(UNIX_TIMESTAMP(ts2)-UNIX_TIMESTAMP(ts1)) AS slowest,MIN(UNIX_TIMESTAMP(ts2)-UNIX_TIMESTAMP(ts1)) AS quickest,AVG(UNIX_TIMESTAMP(ts2)-UNIX_TIMESTAMP(ts1)) AS average FROM bugdb WHERE ts2 > ts1"; +if ($phpver > 0) { + $query .= " AND SUBSTRING(php_version,1,1) = '$phpver'"; +} $res = mysql_query($query); $row = mysql_fetch_array($res); + $half = $row['count']/2; -$query = "SELECT UNIX_TIMESTAMP(ts2)-UNIX_TIMESTAMP(ts1) AS half FROM bugdb WHERE ts2 > ts1 ORDER BY UNIX_TIMESTAMP(ts2)-UNIX_TIMESTAMP(ts1) LIMIT $half,1"; +$query = "SELECT UNIX_TIMESTAMP(ts2)-UNIX_TIMESTAMP(ts1) AS half FROM bugdb WHERE ts2 > ts1"; +if ($phpver > 0) { + $query .= " AND SUBSTRING(php_version,1,1) = '$phpver'"; +} +$query .= " ORDER BY UNIX_TIMESTAMP(ts2)-UNIX_TIMESTAMP(ts1) LIMIT $half,1"; $res = mysql_query($query); $median = mysql_result($res,0);

« previous php.mirrors (#7115) next »