* Optimize the order for condition of 'where'.

This commit is contained in:
daitingting
2018-04-03 13:52:28 +08:00
parent 81dfc9c529
commit f4b783f0ca
3 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -832,8 +832,8 @@ class userModel extends model
{
$projects = $this->dao->select('t1.*,t2.*')->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.root = t2.id')
->where('t1.account')->eq($account)
->andWhere('t1.type')->eq('project')
->where('t1.type')->eq('project')
->andWhere('t1.account')->eq($account)
->andWhere('t2.deleted')->eq(0)
->fetchAll();