In a certain PHP version of the customer, the following error Invalid parameter number: no parameters were bound is always reported during certain operations. google found that the php version was too low.
Body:
Today, when dealing with bugs, I found a very strange problem. When performing some operations, I will report: Invalid parameter number: no parameters were bound, but the problem in the local or test machine test are not reproduced, guess whether it is related to the version, so google, found http://forum.typecho.org/topic.php? Id = 1501 said on the second floor of the article that this issue is a version bug that will appear in pdo below php5.2.9. So I found another sub-engineer (5.2.6) in the team to perform the test. The problem was fixed again. The problem was tested on 5.2.17 on his server, and the problem did not occur.
During debugging, the following service errors are reported when this type of operation occurs:
Use PDO to insert a piece of data into the table nw_log (table fields such as uid and content fields). The content field is <a href = 'http: //. xxx /? Tid = 1'> test </a>, and the content of the table fields before the database is imported, the PDO-> quote method is called for escape. The above error is reported on the php5.2.6 host, but it works normally on the 5.2.17 host.
When I just change the content to http://a.xxx /? Tid = 1, on the 5.2.6 and 5.2.17 machines are normal, so the content format again debugging as <a href = "http://a.xxx /? Tid = 1 "> test </a>, the performance of 5.2.6 and 5.2.17 is normal. It seems that it is a single quotation mark.