From ee7a80de54bc41a750ae23fa86fe2d703afe7862 Mon Sep 17 00:00:00 2001 From: Max Pozdeev Date: Thu, 10 Feb 2011 16:52:52 +0300 Subject: [PATCH] =?UTF-8?q?-=20bugfix:=20Error=20while=20filtering=20by=20?= =?UTF-8?q?2=20tags=20or=20more=20in=20mysql=20version=20(thanks=20to=20?= =?UTF-8?q?=D0=93=D0=BE=D1=80=D0=B0=D0=BD=20=D0=A2=D1=80=D0=B0=D1=98=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2=D0=B8=D1=9B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ajax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ajax.php b/src/ajax.php index d0b59d5..b6767e8 100644 --- a/src/ajax.php +++ b/src/ajax.php @@ -60,7 +60,7 @@ elseif(isset($_GET['loadTasks'])) if(sizeof($tagIds) > 1) { $inner .= "INNER JOIN (SELECT task_id, COUNT(tag_id) AS c FROM {$db->prefix}tag2task WHERE list_id=$listId AND tag_id IN (". - implode(',',$tagIds). ") GROUP BY task_id) ON id=task_id"; + implode(',',$tagIds). ") GROUP BY task_id) AS t2t ON id=t2t.task_id"; $sqlWhere = " AND c=". sizeof($tagIds); //overwrite sqlWhere! } elseif($tagIds) { @@ -87,7 +87,7 @@ elseif(isset($_GET['loadTasks'])) elseif($sort == 4) $sqlSort .= "d_edited ASC, prio DESC, ow ASC"; // byDateModified elseif($sort == 104) $sqlSort .= "d_edited DESC, prio ASC, ow DESC"; // byDateModified (reverse) else $sqlSort .= "ow ASC"; - + $t = array(); $t['total'] = 0; $t['list'] = array();