- 博客(18)
- 资源 (7)
- 收藏
- 关注
原创 mysql三表关联分组带where
查不出来: SELECT e.id,e.ename,COUNT(s.id) AS total FROM enterprise e LEFT JOIN comm_port p ON e.id = p.eid LEFT JOIN sendedoutbox s ON p.port = s.CommPort WHERE s.SendTime BETWEEN '2013-08-09 15:31:35' ...
2013-09-07 18:18:38 448
原创 生成webservice客户端代码
首先要配置很多系统变量 java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java http://localhost:8080/axis/services/AdminService?wsdl 如果报错: ava.lang.ClassNotFoundException: org.apache.axis.wsdl.WSDL2Java 解决办法...
2013-08-28 13:38:26 161
原创 jquery表单验证例子
[code="java"] $(document).ready(function(){ $.formValidator.initConfig({formid:"userAdd",onerror:function(msg){return false},onsuccess:function(){return true;}}); $("#title").formValidator(...
2012-05-19 16:40:32 112
原创 Entity Bean (2) : EntityManager [转]
http://blog.csdn.net/totogogo/archive/2007/07/16/1694192.aspx Session bean or MD bean对Entity bean的操作(包括所有的query, insert, update, delete操作)都是通过EntityManager实例来完成的。EntityManager是由EJB 容器自动地管理和配置的,不需要用...
2011-06-21 15:00:53 86
原创 select UUID()赋值
update sns_users set file_path = '/actionfile/2011/06/10' ,file_name = (select UUID() as a) where file_name is null
2011-06-10 09:08:20 1816
原创 MySQL数据库中,如何记录SQL执行语句
原帖 http://blog.csdn.net/xiaoxu0123/archive/2010/10/09/5929996.aspx -- 打开sql执行记录功能 set global log_output='TABLE'; -- 输出到表 set global log=ON; ...
2011-06-09 09:54:50 136
原创 转 再提“MySQL慢查询”
MySQL有一个功能就是可以log下来运行的比较慢的sql语句,默认是没有这个log的,为了开启这个功能,要修改my.cnf或者在MySQL启动的时候加入一些参数。 如果在my.cnf里面修改,需增加如下几行 long_query_time = 1 log-slow-queries = log-queries-not-using-indexes long_query_time...
2011-05-26 19:52:31 98
原创 mysql大数据量查询的注意事项和技巧
1、在Insert等操作MYSQL的时候不要关闭MYSQL如果非的关闭请使用mysqladmin的shutdown方法而不是mysql.server stop方法。 2、请在需要的地方设置INDEX。 3、做好数据备份 4、使用更多的内存 5、启动查询缓存,是最终提升性能的方法,即使你没设置INDEX sql中尽量不要带函数 例如 now() 等等,如果带了这些函数 就不启用 缓存...
2011-05-24 23:18:06 290
原创 mysql DATE_FORMAT 注意事项
DATE_FORMAT(push_date,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d') [b]注意: Y m d 的大小写情况[/b] 下面是函数的参数说明: %S, %s 两位数字形式的秒( 00,01, . . ., 59) %i 两位数字形式的分( 00,01, . . ., 59) %H 两位数字形式的小时,24 小时...
2011-05-23 11:32:01 207
原创 update where in limit
update tb1 a set a.end_date ='2011-05-23' where a.id = ( select h.id from ( select id from tb2 history where history.adsite_id =141 and history.en_id=7 order by history.id desc limit 0,1 ) as h ...
2011-05-19 13:44:16 162
原创 MappingException: No Dialect mapping for JDBC type: -1
MappingException: No Dialect mapping for JDBC type: -1 错误原因: sql查询的结果不能映射到实体上或没有指定实体类
2011-05-10 19:04:40 95
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人