随笔分类 -  DB

摘要:sql参数化查询已被视为最有效可预防SQL注入攻击(SQL Injection) 的攻击手法的防御方式【参考】http://zh.wikipedia.org/wiki/%E5%8F%82%E6%95%B0%E5%8C%96%E6%9F%A5%E8%AF%A2【参考】http://baike.baidu.com/view/3061939.htm有部份的开发人员可能会认为使用参数化查询,会让程式更不好维护,或者在实作部份功能上会非常不便[来源请求],然而,使用参数化查询造成的额外开发成本,通常都远低于因为SQL隐码攻击漏洞被发现而遭受攻击,所造成的重大损失。除了安全因素,相比起拼接字符串的 SQL 阅读全文
posted @ 2012-05-31 11:30 Sheldon.Dai 阅读(751) 评论(0) 推荐(0)
摘要:mysql 也可以像bash shell那样,按tab键自动补全表名,字段名$ mysql -uroot -p --auto-rehash【参考】http://www.phpmag.ru/2009/01/28/mysql-how-to-enable-auto-completion/ 阅读全文
posted @ 2012-05-26 00:22 Sheldon.Dai 阅读(496) 评论(0) 推荐(0)
摘要:HTML5新增本地数据库SQLLite,<!DOCTYPE html><html><head> <meta charset="utf-8"></head><body> <script> var db = openDatabase('mydb','1.0','for test',2*1024*1024);//数据库名mydb,版本1.0,描述for test,大小2m db.transaction(function (tx){ tx.execut 阅读全文
posted @ 2012-05-25 10:46 Sheldon.Dai 阅读(793) 评论(0) 推荐(1)
摘要:# /etc/init.d/mysqld start# /etc/init.d/mysqld stop# /etc/init.d/mysqld restarthttp://bytes.com/topic/mysql/answers/704453-how-start-stop-mysql-service 阅读全文
posted @ 2012-05-19 12:39 Sheldon.Dai 阅读(318) 评论(0) 推荐(0)