====== Unterschiede ====== Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
|
select [2019/08/18 13:00] jonas |
select [2020/02/22 11:19] (aktuell) jonas |
||
|---|---|---|---|
| Zeile 14: | Zeile 14: | ||
| ->orderBy('id') | ->orderBy('id') | ||
| ->all(); | ->all(); | ||
| + | |||
| + | // mit 2 Order-By: | ||
| + | $model::find()->orderBy([ | ||
| + | 'id_date' => SORT_DESC, | ||
| + | 'item_no'=>SORT_ASC | ||
| + | ]); | ||
| // return the number of active customers | // return the number of active customers | ||
| Zeile 26: | Zeile 32: | ||
| ->indexBy('id') | ->indexBy('id') | ||
| ->all(); | ->all(); | ||
| + | |||
| + | // Grösser/kleiner als | ||
| + | return Country::find() | ||
| + | ->where(['>=', 'population', $lower]) | ||
| + | ->andWhere(['<=', 'population', $upper]) | ||
| + | ->all(); | ||
| </code> | </code> | ||