在developcode过程中,我们往往要根据需求对一组数据进行排序,当然frontend可以依靠js进行排序,这里要说的是在backend怎样进行排序:在后端进行排序,我们需要用到Collections类的sort方法,如果只是对一组数字、字母排序,可以直接使用Collections.sort(List<?>list)..
分类:
编程语言 时间:
2015-04-15 15:00:38
阅读次数:
187
一、查询 select 字段列表 from 表名列表 [where 条件表达式][group by 字段列表[having 条件表达式]] [order by 字段列表[asc|desc]] 含义:在from后面给出的表中,按照where给定的条件,select出规定的字段列表。如何有group b...
分类:
数据库 时间:
2015-04-11 13:14:45
阅读次数:
176
原文链接:http://www.cnblogs.com/mailingfeng/archive/2013/01/07/2850116.htmlorder by 的数值型灵活使用select * from table_a where order by decode(函数,'asc',1,'desc',...
分类:
数据库 时间:
2015-04-10 17:32:02
阅读次数:
188
1 = ord("A") and $fchar = -20319 and $asc = -20283 and $asc = -19775 and $asc = -19218 and $asc = -18710 and $asc = -18526 and $asc = -18239 and $asc....
分类:
Web程序 时间:
2015-04-09 21:17:31
阅读次数:
162
for((i=91;i>=1;i--));
do
dt=`date +‘%Y%m%d‘ -d"-${i} days"`;
if [ "$dt" = "20150309" ]; then
break;
fi
SQL=‘SELECT `id` FROM `l_pro_index_‘${dt}‘` ORDER BY `id` ASC LIMIT 1;‘
...
分类:
数据库 时间:
2015-04-08 20:04:04
阅读次数:
169
函数 bool array_multisort ( array &$arr [, mixed $arg = SORT_ASC [, mixed $arg = SORT_REGULAR [, mixed $...]]] )参数说明: 函数对多个数组或多维数组进行排序第一个参数是数组,随后的每一个参数....
分类:
Web程序 时间:
2015-04-08 12:47:45
阅读次数:
160
例如当前文章的ID是4 sql如下:上一篇:select top 1 id,title from tb_ScGongGao where id4 and isdel=0 order by addTime asc,id asc一个倒序,一个正序, 取结果的TOP1 就是想要上下篇文章了
分类:
其他好文 时间:
2015-04-08 10:40:01
阅读次数:
106
今天使用xp_readerrorlog第一次在新服务器查询一个死锁信息,结果一直在运行,即使kill了也一直在运行:
(分别在2个服务器实例中运行,其中一个已经kill)
exec xp_readerrorlog 0,1,NULL,NULL,'2015-01-07 22:13:10','2015-01-07 22:13:11','ASC'
而下面这个执行是正常的,结果很快出来:
e...
分类:
数据库 时间:
2015-04-07 21:47:44
阅读次数:
208
function toSort(orderBy) { if (orderBy == $('#orderBy').data("order")) {// 再次点击同一个排序时 $('#orderBy').data("ascDesc", "asc" == $('#orderBy').data("a...
分类:
Web程序 时间:
2015-04-07 15:22:27
阅读次数:
211
最近学习ssh协议,为了方便,自己先实现一套telnet服务,以便之后套用ssh。先从telnet客户端做起。这里先给出RFC的文档链接:http://oss.org.cn/man/develop/rfc/RFC854.txt。基本上把telnet介绍得差不多了。但关于NVT的介绍太少,也没有给出一个标准。就比如说键盘的方向键ASC..
分类:
Web程序 时间:
2015-04-01 20:24:30
阅读次数:
208