D
D
Dmitriy-Kim2020-07-21 08:38:25
Yii
Dmitriy-Kim, 2020-07-21 08:38:25

How to create a condition in Yii?

Good afternoon!

Tell me how to create a selection condition.

The code:

Yii::app()->language = Yii::app()->user->getState('lang', 'ru');


It is necessary to make a selection based on the sites database and the site_id column. If site_id = 3 then in the code above ('lang', 'ru'), and if site_id = 1 or 2 then the code ('lang', 'kk')

Tell me how to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
P747, 2020-07-21
@P747

https://yiiframework.com.ua/ru/doc/guide/2/db-acti...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question