Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
systems:yii2:modules [2018/04/05 16:55]
smayr [Using Custom Database]
systems:yii2:modules [2018/04/18 09:56] (current)
smayr [Using Custom Database]
Line 263: Line 263:
     {     {
         return "{{%item_product}}";  // formatted to allow table prefix (where % goes)         return "{{%item_product}}";  // formatted to allow table prefix (where % goes)
 +        
 +        // NOTE: To query the raw table name, use the following:
 +        //   echo Yii::$app->db->schema->getRawTableName(app\models\ItemProduct::tableName());
 +        // Displays as follows (assuming 'mod_' table prefix):
 +        //   mod_item_product
     }     }
          
Line 288: Line 293:
   * [[https://stackoverflow.com/questions/27254540/multiple-database-connections-and-yii-2-0|Multiple Database Connections in Yii 2]]   * [[https://stackoverflow.com/questions/27254540/multiple-database-connections-and-yii-2-0|Multiple Database Connections in Yii 2]]
   * [[https://stackoverflow.com/questions/34051383/yii2-modules-in-advanced-template|Yii 2 Modules in Advanced template]]   * [[https://stackoverflow.com/questions/34051383/yii2-modules-in-advanced-template|Yii 2 Modules in Advanced template]]
 +  * [[https://www.yiiframework.com/doc/guide/2.0/en/concept-autoloading|Yii 2 Class Autoloading and Namespaces]]
   * [[https://www.yiiframework.com/doc/guide/1.1/en/basics.namespace|Yii 1.1 Namespaces]]   * [[https://www.yiiframework.com/doc/guide/1.1/en/basics.namespace|Yii 1.1 Namespaces]]
   * [[https://github.com/yiisoft/yii2/issues/3647|Better configuration of frontend, backend, and modules]]   * [[https://github.com/yiisoft/yii2/issues/3647|Better configuration of frontend, backend, and modules]]
   * [[https://yii2-cookbook.readthedocs.io/structure-backend-frontend-modules/|Yii 2 Cookbook: Structure of Backend/Frontend Modules]]   * [[https://yii2-cookbook.readthedocs.io/structure-backend-frontend-modules/|Yii 2 Cookbook: Structure of Backend/Frontend Modules]]