* 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

View File

@@ -139,7 +139,7 @@ class projectModel extends model
$projects = $this->dao->select('*')->from(TABLE_PROJECT)
->where('iscat')->eq(0)
->andWhere('deleted')->eq(0)
->onCaseOf($mode == 'noclosed')->andWhere('status')->ne('done')->endCase()
->beginIF($mode == 'noclosed')->andWhere('status')->ne('done')->endIF()
->orderBy('status, end desc')->fetchAll();
$pairs = array();
foreach($projects as $project)
@@ -153,7 +153,7 @@ class projectModel extends model
public function getList($status = 'all')
{
return $this->dao->select('*')->from(TABLE_PROJECT)->where('iscat')->eq(0)
->onCaseOf($status != 'all')->andWhere('status')->in($status)->endcase()
->beginIF($status != 'all')->andWhere('status')->in($status)->endIF()
->andWhere('deleted')->eq(0)
->orderBy('status, end DESC')
->fetchAll();