* change onCaseOf/endCase into beginIF/endIF

This commit is contained in:
chencongzhi520
2010-06-22 05:56:24 +00:00
parent 0d8748f2ba
commit 3a8564cbcb
11 changed files with 280 additions and 280 deletions
+2 -2
View File
@@ -129,8 +129,8 @@ class todoModel extends model
->where('account')->eq($account)
->andWhere("date >= '$begin'")
->andWhere("date <= '$end'")
->onCaseOf($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->endCase()
->onCaseOf($status == 'undone')->andWhere('status')->ne('done')->endCase()
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->endIF()
->beginIF($status == 'undone')->andWhere('status')->ne('done')->endIF()
->orderBy('date, status, begin')
->query();
while($todo = $stmt->fetch())