贴出的代码实现了基本的增删改查,有哪些地方有问题欢迎指正,也欢迎交流,每一次的进步都离不开大家的帮助。...
分类:
编程语言 时间:
2014-06-05 11:52:01
阅读次数:
388
第一篇:ztree简单介绍,整合ztree的一些功能和demo演示
第二篇:ztree与springmvc+spring+mybatis整合实现增删改查
第三篇:ztree实现同级拖拽排序并将排序结果保存数据库...
分类:
其他好文 时间:
2014-06-05 06:55:54
阅读次数:
212
今天学习了Laravel的分页功能,感觉它这个非常的好用.
下面拿出来和大家分享一下.
首先第一步,我们需要获取到查询的结果.
方法大家应该各有所异,无非包括各种条件,排序.但是最后我们必须通过
paginate(PAGESIZE)来获取选定的结果.
例如:我使用Eloquent 来获取数据.
$ret = User::where('age','gt',25)->orderBy('se...
分类:
Web程序 时间:
2014-06-04 21:39:59
阅读次数:
728
1. mysql忘记密码
vim /etc/my.conf 文件在mysqld下添加skip-grant-tables,表示mysql在登录的时候不检查权限。登录mysql。直接运行mysql> use mysql;
> update user set Password=password('root') where User='root'
> flush privileges;
> qu...
分类:
数据库 时间:
2014-06-03 02:24:16
阅读次数:
283
【题目】
Given a 2D board and a word, find if the word exists in the grid.
The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or vertically neighboring. The same letter cell may not be use...
分类:
其他好文 时间:
2014-06-03 01:07:58
阅读次数:
329
【题目】
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].
The...
分类:
其他好文 时间:
2014-06-01 10:46:29
阅读次数:
242
【题目】
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0.
...
分类:
其他好文 时间:
2014-06-01 09:16:29
阅读次数:
242
select total_user from a_user_no where date_time=(select max(date_time) from a_user_no where
‘2013-05’+ "'=to_char(date_time,‘yyyy-mm’));
通过max 函数来去5月份出现最大日期的数据...
分类:
数据库 时间:
2014-06-01 08:53:00
阅读次数:
312
查询crm_linkman表中,birthday(数据库中为date类型)字段中,月日为5-31的记录(主要用于检索今天有没有联系人生日)
SELECT * FROM crm_linkman WHERE MONTH(birthday) = 5 and DAYOFMONTH(birthday) = 31...
分类:
编程语言 时间:
2014-06-01 08:52:21
阅读次数:
355
ResultMap在实际的开发中,数据库不总是我们希望看到的样子。比如我们希望User的主键是id但是数据库偏偏喜欢叫它u_id,这样一来原先的resultType似乎就失效了,不带这么玩的,整个人都不好了。于是mybatis给出了他的方案——resultMap。把我们从复杂的命名问题中解救出来~~...
分类:
其他好文 时间:
2014-05-31 18:44:40
阅读次数:
321