[关闭]
@xtccc 2017-10-05T21:09:43.000000Z 字数 249 阅读 1360

Prepared Statements

Database



为了防止SQL Injection,我们需要使用Prepared Statement来构造query,而不是直接拼接字符串。

对于一些特殊的where clause,使用Prepared Statement时需要一些特别的技巧, 例如in, like.


"IN" clause


参考:



"LIKE" clause


参考:

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注