PDOStatement 在所有绑定应用后获取 SQL
您好, 我想从 PDOStatement
获得完整的查询,但是我只找到 $queryString
属性,它似乎只包含原始字符串,而没有应用绑定。我可以迭代绑定并自己替换它,但是我想获取该类在内部使用的 sql。这有可能吗?谢谢
Possible Duplicates:
Getting a PDO query string with bound parameters without executing it
PDO Prepared Statements
Hi,
I would like to get a full query from PDOStatement
, however I only found the $queryString
property which seems to contain merely the original string without the bindings applied. I could iterate through the bindings and replace it myself, however I'd like to get the sql this class is working with internally. Is this possible somehow? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论