summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-03-22 11:13:04 +0100
committerYorhel <git@yorhel.nl>2009-03-22 11:13:04 +0100
commit9765be8dc46d9f458fea8c548cde02e3dba7b920 (patch)
treeb4e5e15f44341603366ab53d2c54661a52d1ceb9 /util
parent09f80833cef287a5a4f5cf1018b19f8c2db3341e (diff)
Fixed tiny SQL bug
Diffstat (limited to 'util')
-rw-r--r--util/dump.sql2
-rw-r--r--util/updates/update_2.3.sql2
2 files changed, 2 insertions, 2 deletions
diff --git a/util/dump.sql b/util/dump.sql
index 993baaa3..a9681c10 100644
--- a/util/dump.sql
+++ b/util/dump.sql
@@ -575,7 +575,7 @@ DECLARE
i RECORD;
l RECORD;
BEGIN
- FOR l IN SElECT id FROM tags WHERE meta = FALSE AND AND state = 2 EXISTS(SELECT 1 FROM tags_parents WHERE parent = id) LOOP
+ FOR l IN SElECT id FROM tags WHERE meta = FALSE AND state = 2 AND EXISTS(SELECT 1 FROM tags_parents WHERE parent = id) LOOP
FOR i IN SELECT tag FROM tag_tree(l.id, 0, true) LOOP
FOR r IN SELECT l.id, vid, uid, vote, spoiler FROM tags_vn WHERE tag = i.tag LOOP
RETURN NEXT r;
diff --git a/util/updates/update_2.3.sql b/util/updates/update_2.3.sql
index 32b04b31..25c6da21 100644
--- a/util/updates/update_2.3.sql
+++ b/util/updates/update_2.3.sql
@@ -117,7 +117,7 @@ DECLARE
i RECORD;
l RECORD;
BEGIN
- FOR l IN SElECT id FROM tags WHERE meta = FALSE AND AND state = 2 EXISTS(SELECT 1 FROM tags_parents WHERE parent = id) LOOP
+ FOR l IN SElECT id FROM tags WHERE meta = FALSE AND state = 2 AND EXISTS(SELECT 1 FROM tags_parents WHERE parent = id) LOOP
FOR i IN SELECT tag FROM tag_tree(l.id, 0, true) LOOP
FOR r IN SELECT l.id, vid, uid, vote, spoiler FROM tags_vn WHERE tag = i.tag LOOP
RETURN NEXT r;