cvs: phpweb / bugs.php bugstats.php
| From: | Jim Winstead | Date: | Mon, 09 Jul 2001 01:47:48 +0000 |
| Subject: | cvs: phpweb / bugs.php bugstats.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-5391@lists.php.net to get a copy of this message | ||
jimw Sun Jul 8 21:47:48 2001 EDT
Modified files:
/phpweb bugs.php bugstats.php
Log:
don't use like where a nice substring will do fine
Index: phpweb/bugs.php
diff -u phpweb/bugs.php:1.152 phpweb/bugs.php:1.153
--- phpweb/bugs.php:1.152 Sun Jul 8 21:43:44 2001
+++ phpweb/bugs.php Sun Jul 8 21:47:47 2001
@@ -146,7 +146,7 @@
}
if (!isset($phpver)) $phpver = "4";
- if ($phpver) $where_clause .= " AND php_version LIKE '$phpver%'";
+ if ($phpver) $where_clause .= " AND SUBSTRING(php_version,1,1) = '$phpver'";
/* not in the header, but someone can build a query manually with it. */
if(strlen($by) and $by!='Any')
Index: phpweb/bugstats.php
diff -u phpweb/bugstats.php:1.30 phpweb/bugstats.php:1.31
--- phpweb/bugstats.php:1.30 Sun Jul 8 21:43:44 2001
+++ phpweb/bugstats.php Sun Jul 8 21:47:48 2001
@@ -6,10 +6,6 @@
exit;
}
-if ($phpver != 4 and $phpver != 3) {
- $phpver = 0;
-}
-
function ShowTime($sec) {
if($sec<60) {
return "$sec seconds";
@@ -45,7 +41,7 @@
$query = "SELECT *,UNIX_TIMESTAMP(ts2)-UNIX_TIMESTAMP(ts1) AS timetoclose FROM bugdb";
if ($phpver > 0) {
- $query .= " WHERE php_version LIKE '" . $phpver . "%'";
+ $query .= " WHERE SUBSTRING(php_version,1,1) = '$phpver'";
}
$query .= " ORDER BY bug_type";