diff options
-rw-r--r-- | app/Model/ColumnModel.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Model/ColumnModel.php b/app/Model/ColumnModel.php index 535a31e5..da5ea856 100644 --- a/app/Model/ColumnModel.php +++ b/app/Model/ColumnModel.php @@ -131,8 +131,8 @@ class ColumnModel extends Base { return $this->db->table(self::TABLE) ->columns('id', 'title', 'position', 'task_limit', 'description', 'hide_in_dashboard', 'project_id') - ->subquery('SELECT COUNT(*) FROM '.TaskModel::TABLE.' WHERE column_id='.self::TABLE.'.id AND is_active=1', 'nb_open_tasks') - ->subquery('SELECT COUNT(*) FROM '.TaskModel::TABLE.' WHERE column_id='.self::TABLE.'.id AND is_active=0', 'nb_closed_tasks') + ->subquery("SELECT COUNT(*) FROM ".TaskModel::TABLE." WHERE column_id=".self::TABLE.".id AND is_active='1'", 'nb_open_tasks') + ->subquery("SELECT COUNT(*) FROM ".TaskModel::TABLE." WHERE column_id=".self::TABLE.".id AND is_active='0'", 'nb_closed_tasks') ->eq('project_id', $project_id) ->asc('position') ->findAll(); |