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://community.livejournal.com/php/393297.html

« PHP shell access question || PHP Frameworks »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home