例如当前文章的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
关于Sequence主键的数据库来说,如:insert into category (name_zh, parent_id,show_order, delete_status, description)values (#{nameZh,jdbcType=VARCHAR},#{parentId,jdb...
分类:
数据库 时间:
2015-04-08 00:46:04
阅读次数:
152
题目链接:Subsets II
Given a collection of integers that might contain duplicates, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not ...
分类:
其他好文 时间:
2015-04-07 23:33:25
阅读次数:
156
题目链接:Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.
You should preserve the original relative order of t...
分类:
其他好文 时间:
2015-04-07 23:33:18
阅读次数:
292
1. #将传入的数据都当成一个字符串,会对自动传入的数据加一个双引号。如:order by #user_id#,如果传入的值是111,那么解析成sql时的值为order by "111", 如果传入的值是id,则解析成的sql为order by "id". 2. $将传入的数据直接显示生成在sql....
分类:
其他好文 时间:
2015-04-07 23:06:45
阅读次数:
186
Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:
其他好文 时间:
2015-04-07 22:57:47
阅读次数:
106
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
For exa...
分类:
其他好文 时间:
2015-04-07 21:38:13
阅读次数:
138
Given a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ],...
分类:
其他好文 时间:
2015-04-07 21:25:43
阅读次数:
116
function toSort(orderBy) { if (orderBy == $('#orderBy').data("order")) {// 再次点击同一个排序时 $('#orderBy').data("ascDesc", "asc" == $('#orderBy').data("a...
分类:
Web程序 时间:
2015-04-07 15:22:27
阅读次数:
211