svn: /web/php-bugs/trunk/include/ query.php
| From: | Felipe Pena | Date: | Sat, 14 Aug 2010 15:45:03 +0000 |
| Subject: | svn: /web/php-bugs/trunk/include/ query.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-8741@lists.php.net to get a copy of this message | ||
felipe Sat, 14 Aug 2010 15:45:03 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=302224
Log:
- Err, missing NULL check
Changed paths:
U web/php-bugs/trunk/include/query.php
Modified: web/php-bugs/trunk/include/query.php
===================================================================
--- web/php-bugs/trunk/include/query.php 2010-08-14 15:44:06 UTC (rev 302223)
+++ web/php-bugs/trunk/include/query.php 2010-08-14 15:45:03 UTC (rev 302224)
@@ -190,7 +190,7 @@
if ($order_by == 'avg_score') {
$query .= ' GROUP BY bugdb.id';
- $order_by = 'AVG(v.score)+3';
+ $order_by = 'IFNULL(AVG(v.score), 0)+3';
}
$query .= " ORDER BY $order_by $direction";