Alibabacloud.com offers a wide variety of articles about error code 1054 unknown column in field list, easily find your error code 1054 unknown column in field list information here online.
Error messageProblem analysis"Conuintoken" in "field list". The mysql master knows that this column does not exist. To solve this problem, you only need to add a column.Solution1. Modify the config/config_global.php file to find the following code
Has anyone ever told you that your SQL statement has returned an error? Quote: The real environment for online operation is always unpredictable. it is clear that when you test locally, all the situations are OK, maybe you are still excited about
Object-oriented approach
Let's take a look at the error handling of the PDO in PHP, if the connection error is handled, using an object-oriented approach:
Copy CodeThe code is as follows:
try {
$db = new PDO (' Mysql:host=localhost;dbname=test ', $
What should I do if an error occurs in the program during PHP and database development using PDO? Here we describe the error information and exception handling of the PDO class. Object-oriented approach
First, let's take a look at the handling of
Object-Oriented ApproachFirst, let's take a look at the handling of connection errors and PDO errors in PHP, and use object-oriented methods to handle them:Copy codeThe Code is as follows:Try {$ Db = new PDO ('mysql: host = localhost; dbname = test',
Php pdo error handling. The object-oriented method first looks at the handling of connection errors and PDO errors in PHP. the object-oriented method is used for processing: Copy the code as follows :? Phptry {$ dbnewPD object-oriented method
First,
Object-oriented approach
First look at the handling of connection errors, PDO error handling in PHP, using an object-oriented approach:
Copy Code code as follows:
try {
$db = new PDO (' Mysql:host=localhost;dbname=test ', $user,
Quote: The real environment of online operation is always unpredictable, obviously you are in the local test when all kinds of situations are OK do not want to, perhaps you still in a place for yourself cool effect and magical design excited!
Here is a solution for MySQL query error prompts. Some of them can be solved by yourself. It is not necessary to ask questions over and over again. Unless it is a conventional method that cannot be solved ~
The following is a common database error
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.