+----+-----+---------------------+---------------------+
| id | uid | start | end |
+----+-----+---------------------+---------------------+
| 1 | 1 | 2011-12-21 12:46:26 | 2011-12-31 12:46:36 |
| 2 | 1 | 2011-12-30 12:46:48 | 2011-12-30 13:46:57 |
| 3 | 2 | 2011-12-28 12:47:15 | 2011-12-31 12:47:52 |
| 4 | 2 | 2011-12-29 12:48:46 | NULL |
+----+-----+---------------------+---------------------+
我想求每用户线总滚乱银
uid用户 start线间 end线间
注意:endnull 表示未线线前间-线间大宴
我用ifnull函数实现end否Null问题
要组求总线 所台处理直接语句写陪滑sum比较现问题SQL语句间格式转化秒或者毫秒两者直接相减总;
比Java台System.out.println(new Date().getTime());打印1293778247780