order by 点击字段 desc

解决方案 »

  1.   

    order by 点击率 DESC
      

  2.   

    那就ORDER BY 你的字段了
    顺排ASC(默认)
    逆排DESC
      

  3.   

    在Varchar中没有办法判断,看来只有转换字段类型了
      

  4.   

    order by  CONVERT(int, ClickNum) desc
      

  5.   

    感谢各位,我用了楼上“danis_cn(宇宙鸟)”,
    在phpmyadmin出现错误提示如下:错误
    SQL 查询:  SELECT * 
    FROM `xiaohua` 
    ORDER BY CONVERT( int, all_no ) DESC 
    LIMIT 0 , 30 MySQL 返回: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'int , all_no ) DESC 
    LIMIT 0, 30' at line 1 
      

  6.   

    convert函数是mysql在4.02版本中加入的函数
    你看看你的mysql版本号,是否支持?
      

  7.   

    SELECT * 
    FROM `xiaohua` 
    ORDER BY CONVERT( int, all_no ) DESC 
    LIMIT 0 , 30
      

  8.   

    convert的用法应该是convert(all_no,unsigned)不过,为什么要保留varchar类型?
    在每行上作convert会导致该查询很慢
      

  9.   

    转换之前 你要确定 那个VCHAR里头 只有数字
    如果 比较负责我建议你做个 后台辅助的数据处理程序
    我一般用C 来做,我们公司这种事情太多了....