gii CLI
php yii help gii/mode |
DB where
- 字符串格式,例如:
'status=1'
- 哈希格式,例如:
['status' => 1, 'type' => 2]
- 操作符格式,例如:
['like', 'name', 'test']
- 对象格式,例如:
new LikeCondition('name', 'LIKE', 'test')
简单条件
// SQL: (type = 1) AND (status = 2). |
AND OR
// SQL: `id=1 AND id=2` |
NOT
// SQL: `NOT (attribute IS NULL)` |
BETWEEN
// not between 用法相同 |
IN
// not in 用法相同 |
LIKE
// SQL: `name LIKE '%tester%'` |
EXIST
// not exists用法类似 |
References
– EOF –