问题描述
PDO 有选项 PDO::ATTR_EMULATE_PREPARES 控制是否准备好仅当数据库不支持或始终不支持时才应模拟语句.但是,它没有提到它是否总是默认模拟它们.
PDO has the option PDO::ATTR_EMULATE_PREPARES which controls if prepared statements should be emulated only if not supported by the DB or always. However, it does not mention if it always emulates them by default or not.
通常人们会假设仅在必要时才使用仿真,但由于它是 PHP,因此不能仅仅因为它是健全的就假设......
Usually one would assume that emulation is only used if necessary but since it's PHP nothing can be assumed just because it's sane...
推荐答案
取决于数据库驱动程序.它们总是默认模拟对于 MySql(当然您可以手动关闭该选项);在 Postgres 中,正确的默认设置是 动态检测.
Depends on the database driver. They are always emulated by default for MySql (although of course you can turn the option off manually); in Postgres the proper default setting is detected dynamically.
这篇关于默认情况下,PDO 是否总是使用模拟准备好的语句?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)