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

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

藏色散人
藏色散人 forward
2020-04-26 17:26:57 1894browse

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 inTP5:

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!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete