草庐IT

Adricatic

全部标签

PHP MySQL 按计数查找、计数和排序结果

我有这样的查询:$sql="SELECT*FROMglobal_infoWHEREtitleLIKE'%$string%'ORtagLIKE'%$string%'ORbodyLIKE'%$string%'";如何计算每行的结果数,然后根据计数对结果进行排序?例如第1行:标题:NicephotoofAdricaticsea正文:ThisismeandmyfriendattheAdriaticsea,somewhereinMontenegro.ColorofAdricaticseaisamazing.标签:Adriaticsea,photo第2行:标题:Adricaticsea正文:Tak