Error collection during PHP development, which is occasionally updated.

Source: Internet
Author: User

Fatal error: Non-static method Conn ::__ construct () cannot be called statically in/file. php

There is no static method (which refers to the method parameter, string type) and cannot be referenced from the static context.

Fatal error: [] operator not supported for strings in/file. php

When a variable is set to a non-array type, you cannot use [] to add a data key value to a variable with the same name.
Solution: 1. Change the variable name, 2. Use $ var = array (...)
Example:
Copy codeThe Code is as follows:
// String type
$ Err = $ e-> getMessage ();

// An error will be reported when the command is executed here.
$ Err [] = array
(
'Gid' => $ this-> _ get ['id'],
'Url' => $ new,
'Log' => $ err,
'Time' => time ()
);

Fatal error: Declaration of Listing: content () must be compatible with that of InewsList: content () in file \ List_1.php on line 7

All class methods of the unified interface must be consistent with the interface rules: Scope declaration, Method Name, number of parameters

Warning: mysqli: query () [mysqli. query]: Couldn't fetch Insert in/file. php

You must use mysqli to connect to the database and then return the result set for the operation.

Warning: 1064_You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near...

Online Search is a MYSQL compatibility problem, and the actual operation is a syntax error. Check whether the SQL statement is correctly written.

Warning: array_shift () expects parameter 1 to be array, integer given

The first parameter of the function must be an array.

#1366-Incorrect integer value: ''for column 'id' at row 1

The mysql version is msyql 5.1.14 WIN32. The error occurs because the auto-increment ID is not assigned a value, although the previous version can be automatically added without being assigned a value, however, in the new version of msyql, the value must be NULL.

#1136: Column count doesn't match value count at row 1

Check whether there are any fields with auto-increment serial numbers.
The stored data does not match the field type definition of the database table.
Whether the field type is correct or not, and whether or not one type of data is stored in another type.

# 1062_Duplicate entry '...' for key 'map'

Duplicate keywords, which may be the primary key ID or a unique field.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.