summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-08 20:16:17 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-08 20:16:17 -0500
commit647568cdddeaebdb0bd78cec53da9c8d6ac367a3 (patch)
treef60ee28a1ea67f806fb908e277ab9f777b66d361 /app/Model
parent58d4231f06fbcbc54573504af2c2a4561b9e89ed (diff)
Make query compatible with Postgres
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/ColumnModel.php4
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();