Код: Выделить всё
$query->andFilterWhere([$filterPrice > 30000 ? '>' : '<=', 'price', $filterPrice]);
Код: Выделить всё
$query->andFilterWhere([$filterPrice > 30000 ? '>' : '<=', 'price', $filterPrice]);
Код: Выделить всё
if ($model->load(Yii::$app->request->post()) && $model->validate()) {
$model->yourPtoperty = $yourPropertyNewValue;
$model->save(false);
return $this->redirect(['view', 'id' => $model->id]);
} else {
Код: Выделить всё
select products.name, sum(orders_products.qty) all_qty
from products
inner join orders_products on products.id = orders_products.product_id
group by products.name
order by all_qty desc
limit 10
Код: Выделить всё
Url::to(['', 'language' => 'en', 'id' => Yii::$app->params['parameter_id']['id'] ])
Убрать column_name и сериализовать всю запись(или только измененные столбцы) не подойдет?Sereja3578 писал(а): ↑2017.08.11, 16:08 1) Одна таблица на все изменения со следующей структурой
table_name, column_name, old_value, new_value, value_type, date_time, user_id, session_id, ...
Код: Выделить всё
class PostTransport implements \Swift_Transport
{
...
}
Код: Выделить всё
Model::find()->orderBy('RAND()')->one()