我这里有我的代码
$query=mysqli_query($dbcon,"select count(user_name) from `viewlist` where user_name='$_name'");
我想要做的是它只显示带有用户名$_name
的列,但是将它排列在通过id递减的表上(这是自动递增)。我尝试按照DESC
订购,但没有工作。
答案 0 :(得分:-2)
也许..
$query=mysqli_query($dbcon,"select tb.* from (select count(user_name) as total from `viewlist` group by user_name) as tb order by tb.total desc");