Home > php教程 > php手册 > body text

TP5 Model sets the data table so that you no longer kneel

WBOY
Release: 2016-10-17 09:12:04
Original
2461 people have browsed it

fuck the Official CODE
The manual says,
//Set the complete data table name corresponding to the current model
protected $table = 'think_user';

Why not user and add the prefix manually? So why set this thing up?

Manually change the Model
//Set the current data table and model name
if (!empty($this->table)) {
$query->setTable($query->getConfig('prefix') . $this->table);

source:php.cn
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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template