- 博客(4)
- 收藏
- 关注
原创 jdbc 批量更行
public void updateBatch(String sql, List list) { try { conn = this.getConn(); conn.setAutoCommit(false); ps = conn.prepareStatement(sql); for(int i = 0; i<list.size();i++){ ps
2015-01-21 16:47:59 496
原创 mybatis 一对多的配置 和 查询数据覆盖问题
mybatis 在配置关联关系查询的时候 关联查询的 2个表的字段名不能重名 否则就会出现 主表的数据吧宠表相同字段的数据给覆盖掉了。比如学生表 student 有字段 s_id s_name grade_id 还有一张班级表 grade g_id g_name
2015-01-19 17:30:45 1649
转载 js 日期转换
Date.prototype.format = function(format){ /* * format="yyyy-MM-dd hh:mm:ss"; */ var o = { "M+": this.getMonth() + 1, "d+": this.getDate(),
2015-01-14 19:14:14 447
原创 mysql查询一周,一月的数据
每月的数据:select * from table t where date_format(‘2015-01-01’,'%Y-%m') = date_format(kh_createtime,'%Y-%m');每周的数据:select * from table t where (select date_add(date('2015-01-01'),INTERVAL -weekday('2015
2015-01-13 12:24:53 612
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人