sorting the average

From: Date: Sat, 24 Aug 2002 00:46:52 +0000
Subject: sorting the average
Groups: php.db 
Request: Send a blank email to php-db+get-21331@lists.php.net to get a copy of this message
I have these two lines in my SELECT clause thingy: avg(article_comment.vote) as avg, IFNULL(avg(article_comment.vote), 3) as avg when I sort the later with this: order by avg desc It only sorts the ones with an average rating take from article_comment.vote. The ones with no votes just stay at the top no matter wheather I say: order by avg desc or: order by avg asc. When I swap them the ones at the bottom will switch into the right order. -- JJ Harrison webmaster@tececo.com www.tececo.com -- Please reply on the list/newsgroup unless the reply it OT.

« previous php.db (#21331) next »