SELECT *, count(*) AS total FROM (`i_com`) RIGHT OUTER JOIN `i_all` ON `i_all`.`id_all` = `i_com`.`id_all` WHERE `category` IN ('seo', 'sites', 'ide', 'des', 'javascript_jquery', 'php_sql') AND `deleted` = 0 ORDER BY `total` desc
#1046 - No database selected
The i_all table contains the site materials, the i_com table contains comments. Interconnected through material id (id_all). I'm trying to get a list of materials sorted by number of comments. If there are other ideas - suggest. Or it is necessary to sort on РНР?
>_<you are not able to translate three words? - Sh4dow