Home Backend Development PHP Tutorial PDO version problem Invalid parameter number: no parameters were bound_PHP tutorial

PDO version problem Invalid parameter number: no parameters were bound_PHP tutorial

Jul 21, 2016 pm 03:13 PM
invalid pdo Version question

I found a very strange problem when dealing with bugs today. When performing certain operations, it will report: Invalid parameter number: no parameters were bound. However, the problem has not been reproduced locally or on the test machine. , I guessed whether it was related to the version, so I googled it and found http://forum.typecho.org/topic.php?id=1501 The second floor of the article said that the problem is a version bug, which is below php5.2.9 will appear in the pdo. So I found another machine (5.2.6) in the team to do the test, and the problem was indeed reproduced. When I tested it on 5.2.17 on his server, the problem did not appear.

During debugging, it was found that the following business reported the above error when this type of operation occurred:

Use PDO to the table nw_log (table fields such as uid and content fields) Insert a piece of data in the content field, where the content of the content field is test, and the content of the table field will call PDO before entering the database. ->quote method for escaping. On the php5.2.6 machine, the above error is reported, but on the 5.2.17 machine it behaves normally.

When I just modified the content to http://a.xxx/?tid=1, it behaved normally on both the 5.2.6 machine and the 5.2.17 machine, so I formatted the content again When debugging as test, the performance is normal on 5.2.6 and 5.2.17. It seems to be caused by single quotes. .

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326401.htmlTechArticleI found a very strange problem when dealing with bugs today. When performing a certain type of operation, it will report: Invalid parameter number: no parameters were bound, but the problem is local or...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Tutorial on updating curl version under Linux! Tutorial on updating curl version under Linux! Mar 07, 2024 am 08:30 AM

To update the curl version under Linux, you can follow the steps below: Check the current curl version: First, you need to determine the curl version installed in the current system. Open a terminal and execute the following command: curl --version This command will display the current curl version information. Confirm available curl version: Before updating curl, you need to confirm the latest version available. You can visit curl's official website (curl.haxx.se) or related software sources to find the latest version of curl. Download the curl source code: Using curl or a browser, download the source code file for the curl version of your choice (usually .tar.gz or .tar.bz2

Check the Kirin operating system version and kernel version Check the Kirin operating system version and kernel version Feb 21, 2024 pm 07:04 PM

Checking the Kylin operating system version and kernel version In the Kirin operating system, knowing how to check the system version and kernel version is the basis for system management and maintenance. Method 1 to check the Kylin operating system version: Use the /etc/.kyinfo file. To check the Kylin operating system version, you can check the /etc/.kyinfo file. This file contains operating system version information. Execute the following command: cat/etc/.kyinfo This command will display detailed version information of the operating system. Method 2: Use the /etc/issue file Another way to check the operating system version is by looking at the /etc/issue file. This file also provides version information, but may not be as good as the .kyinfo file

Interpret the meaning and difference of PHP version NTS Interpret the meaning and difference of PHP version NTS Mar 27, 2024 am 11:48 AM

The meaning and difference of PHP version NTS PHP is a popular server-side scripting language that is widely used in the field of web development. There are two main versions of PHP: ThreadSafe(TS) and Non-ThreadSafe(NTS). On the official website of PHP, we can see two different PHP download versions, namely PHPNTS and PHPTS. So, what does PHP version NTS mean? What is the difference between it and the TS version? Next,

How to easily check the installed version of Oracle How to easily check the installed version of Oracle Mar 07, 2024 am 11:27 AM

How to easily check the installed version of Oracle requires specific code examples. As a software widely used in enterprise-level database management systems, the Oracle database has many versions and different installation methods. In our daily work, we often need to check the installed version of the Oracle database for corresponding operations and maintenance. This article will introduce how to easily check the installed version of Oracle and give specific code examples. Method 1: Through SQL query in the Oracle database, we can

750,000 rounds of one-on-one battle between large models, GPT-4 won the championship, and Llama 3 ranked fifth 750,000 rounds of one-on-one battle between large models, GPT-4 won the championship, and Llama 3 ranked fifth Apr 23, 2024 pm 03:28 PM

Regarding Llama3, new test results have been released - the large model evaluation community LMSYS released a large model ranking list. Llama3 ranked fifth, and tied for first place with GPT-4 in the English category. The picture is different from other benchmarks. This list is based on one-on-one battles between models, and the evaluators from all over the network make their own propositions and scores. In the end, Llama3 ranked fifth on the list, followed by three different versions of GPT-4 and Claude3 Super Cup Opus. In the English single list, Llama3 overtook Claude and tied with GPT-4. Regarding this result, Meta’s chief scientist LeCun was very happy and forwarded the tweet and

How to easily install Python on Windows, you can choose from two methods How to easily install Python on Windows, you can choose from two methods Feb 18, 2024 pm 04:57 PM

Why is Python so popular? The reason is simple: it is easy to learn, easy to use, and quick to use, making it suitable for beginners. No matter what the project is, as long as it involves programming, Python is often my first choice. Moreover, you don’t have to stick to Linux systems, Windows can also support it well. I have Python installed on my Windows 11 operating system and I often use it to write programs and run code. Installing Python on Windows is very simple, and next I will share two common installation methods. Choose the appropriate Python version. Python provides multiple versions. It is very important to choose the appropriate version. This is related to the compatibility and functionality of the program: the current versions include Python2 and

How to tell whether the dp interface is 1.2 or 1.4? How to tell whether the dp interface is 1.2 or 1.4? Feb 06, 2024 am 10:27 AM

The DP interface is an important interface cable in the computer. When using the computer, many users want to know how to check whether the DP interface is 1.2 or 1.4. In fact, they only need to check it in GPU-Z. How to determine whether the dp interface is 1.2 or 1.4: 1. First, select "Advanced" in GPU-Z. 2. Look at "Monitor1" in "General" under "Advanced", you can see the two items "LinkRate (current)" and "Lanes (current)". 3. Finally, if 8.1Gbps×4 is displayed, it means DP1.3 version or above, usually DP1.4. If it is 5.4Gbps×4, then

How to lower the chrome browser version? How to return chrome to the previous version How to lower the chrome browser version? How to return chrome to the previous version Mar 14, 2024 am 09:22 AM

The Chrome browser is currently the browser with the largest number of users and high praise, and is committed to providing users with a comprehensive and fast experience. Some netizens feel that the old version is still easier to use after updating Google Chrome. If they want to downgrade the version of Google Chrome, what should they do? Let’s take a look at the detailed operation method of downgrading Google Chrome! The specific method of downgrading Chrome is to close the Chrome process, open the directory where chrome.exe is located (Application), delete chrome.exe, rename old_chrome.exe to chrome.exe, and delete the \UserData\Default\Web Data file (do not delete this

See all articles