Skip to main content

准备好的语句

¥Prepared Statements

MySQL2 提供 execute 助手,它将准备和查询语句。你还可以使用 prepare/unprepare 方法手动准备/取消准备语句。

¥MySQL2 provides execute helper which will prepare and query the statement. You can also manually prepare / unprepare statement with prepare / unprepare methods.

请参阅 准备好的语句 中的详细文档。

¥See detailed documentaion in Prepared Statements.

提示

如果你再次执行相同的语句,它将从 LRU 缓存中挑选出来,这将节省查询准备时间并提供更好的性能。

¥If you execute same statement again, it will be picked form a LRU cache which will save query preparation time and give better performance.


使用示例:

¥Usage examples: