16
Apr
2015

Yii 2 snippets

16 Apr 2015
php yii migrate/create create_user_table php yii migrate/up Yii::$app->request->baseUrl Url::toRoute $query->from('given t') ->leftJoin('given_product as rp','t.id = rp.issuance_id') ->leftJoin('product as p','p.id = rp.product_id') ->where(['p.status'=>Product::STATUS_GIVEN]); SET FOREIGN_KEY_CHECKS = 0; TRUNCATE table1; SET FOREIGN_KEY_CHECKS = 1; SET FOREIGN_KEY_CHECKS = 0; TRUNCATE article; TRUNCATE brand; TRUNCATE category; SET FOREIGN_KEY_CHECKS = 1;