Mysql 时间格式默认插入值为空时,会以'0000-00-00 00:00:00'填充,这时如果select时会抛出SQLExecption如下: java.sql.SQLException: Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp 解决方法如下: 方法一:jdbc的url加zeroDateTimeBehavior参数: datasource.url=jdbc:mysql://localh…
用DynamicParameters: string where = " where a.is_deleted=0 and a.bvent_id=@bventId and au.user_type=0 and au.attendee_type=0 "; var dyParam = new DynamicParameters(); dyParam.Add("@bventId", query.BventId); if (query.Ids != null &&a…
SQL注入式攻击是利用是指利用设计上的漏洞,在目标服务器上运行Sql命令以及进行其他方式的攻击动态生成Sql命令时没有对用户输入的数据进行验证是Sql注入攻击得逞的主要原因.比如: 如果你的查询语句是select * from admin where username="&user&" and password="&pwd&"" 那么,如果我的用户名是:1 or 1=1 那么,你的查询语句将会变成: select * fro…
参考:http://www.cnblogs.com/Anker/p/3265058.html select /* According to POSIX.1-2001 */ #include <sys/select.h> /* According to earlier standards */ #include <sys/time.h> #include <sys/types.h> #include <unistd.h> int select(int nfds…