更新时间:2022-04-02 08:39:57
查找交易
:允许多个查询要作为块执行。如果其中一个查询失败,您可以执行回滚
以进入数据库的先前状态。
顺便提一下,建议使用参数化查询
:它们有助于防止SQL注入攻击,它们有助于处理奇数数据类型(例如日期时间值或带引号的字符串)。
Look forTransaction
: that allows for several queries to be executed as a block. If one of the queries fails, you can do aRollback
to get to the previous state of your database.
By the way, it is advisable to useparameterized queries
: they help prevent SQL injection attacks, and they help dealing with odd datatypes (e.g. datetime values or strings with quotation marks).
>