'colin_'", which means that the table prefix has been set to "colin_"."/> 'colin_'", which means that the table prefix has been set to "colin_".">

Home  >  Article  >  PHP Framework  >  How to add prefix to table in yii2

How to add prefix to table in yii2

藏色散人
藏色散人Original
2020-07-21 12:01:332886browse

yii2 Method to prefix the table: First find and open the database configuration related files; then set the table prefix through the statement "'tablePrefix'=>'colin_'", which means that the table prefix has been set to "colin_".

How to add prefix to table in yii2

yii2 Add table prefix

config /web >$config >components>db>['tablePrefix'=>'colin_']
  • The table prefix here is colin_.

  • If you want to access table colin_86, you can directly use {{�}} to automatically add the prefix.

Recommended: "yii tutorial"

The above is the detailed content of How to add prefix to table in yii2. For more information, please follow other related articles on the PHP Chinese website!

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