你这样查询出来就一个 符合你条件的记录数
没办法排序啊?
如果打算按时间排序就别查个数了。。
select refund_id,addtime from refund where refund_audit=1 and f_user_uid ='" + userid + "'
order by addtime desc
//按时间倒叙
你现在查询是符合条件的记录总数 不必要去排序!
除非你还想查询其他数据 可以加
如"select count(refund_id), refund_id from refund where refund_audit=1 and f_user_uid ='" + userid + "' order by 时间字段 desc Group by refund_id ";
select count(refund_id) from refund where refund_audit=1 and f_user_uid ='" + userid + "' order by 字段 desc
你这个sql还怎么加升降序啊, count()返回的是结果的行数,只是一个数字,怎么升降序啊