In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article focuses on "how to solve the PDO version problem Invalid parameter number: no parameters were bound", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to solve the PDO version problem Invalid parameter number: no parameters were bound!
Today, I found a very strange problem when dealing with bug. When performing certain operations, it will be reported: Invalid parameter number: no parameters were bound, but the problem has not been reproduced locally or on the test machine. I wondered if it had anything to do with the version, so I went to google and found that the second floor of the http://forum.typecho.org/topic.php?id=1501 article said that the problem is the version of bug, which will appear in the pdo below php5.2.9. So I found another simultaneous machine on the team (5.2.6) to do the test, and sure enough, the problem was reproduced, and it was tested on 5.2.17 on his server, and the problem did not appear.
When debugging, it is found that when this kind of operation occurs, the following business reports the above error:
Use PDO to insert a piece of data into the table nw_log (table fields, columns such as uid, and content fields), where the content of the content field is test, and the contents of the table field are escaped by calling the PDO- > quote method before entering the library. The above error is reported on the php5.2.6 machine, but the performance is normal on the 5.2.17 machine.
When I just changed the content to http://a.xxx/?tid=1, it worked well on both 5.2.6 and 5.2.17 machines, so I debugged the content format to test again, and it was normal on 5.2.6 and 5.2.17, which seems to be caused by single quotes.
At this point, I believe you have a deeper understanding of "how to solve the PDO version problem Invalid parameter number: no parameters were bound". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.