sort by count?
Date: 01/10/06
(PHP Community) Keywords: sql
Is there some possibility to sort this:
$sql = "SELECT band,cover1,cover1year,cover1title,cover2,cover2year,cover2title,cover3,cover3year,cover3title,cover4,cover4year,cover4title,cover5,cover5year,cover5title FROM referenzen ORDER BY band ASC";
by the count of covers (so the ones with 4+ are on top and the ones with only one are at the bottom)? (see this). Not all of the variables are always in use, I don't have any idea how to do this.
Source: http://www.livejournal.com/community/php/393297.html