Home > PHP Framework > ThinkPHP > About the obsolete writing method in Query.php in the TP5 framework

About the obsolete writing method in Query.php in the TP5 framework

藏色散人
Release: 2020-04-26 17:26:57
forward
2002 people have browsed it

About the obsolete writing method in Query.php in the TP5 framework

This is a problem encountered when using the chain method to query the database in TP5:

About the obsolete writing method in Query.php in the TP5 framework

The reason is that each chain method returns a Query object, and the $str {0} writing method in line 370 of Query.php is abandoned.

Change to substr($value ,0,1) as follows.

About the obsolete writing method in Query.php in the TP5 framework

Error disappears:

About the obsolete writing method in Query.php in the TP5 framework

Recommended related tutorials: "TP5"

The above is the detailed content of About the obsolete writing method in Query.php in the TP5 framework. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
tp5
source:segmentfault.com
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template