PDO:无效的参数号:混合命名和位置参数
本文介绍了PDO:无效的参数号:混合命名和位置参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了这个我以前从未见过的警告:
I have come across this warning I've not seen before:
警告:PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: 无效的参数号:混合命名和位置参数...
Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters in...
参考下面的PDO查询(为了方便阅读,已经简化了功能):
Referring to the following PDO query (have simplified the function for ease of reading):
函数和 PDO 查询在查询中没有包含偏移量和限制变量的情况下工作正常.那么是什么原因导致了这个警告?
The function and PDO query works fine without the offset and limit variables included in the query. So what might be causing this warning?
谢谢
推荐答案
Change
到
和
到:
这篇关于PDO:无效的参数号:混合命名和位置参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!