summaryrefslogtreecommitdiff
path: root/util/dump.sql
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/dump.sql
parent09f80833cef287a5a4f5cf1018b19f8c2db3341e (diff)
Fixed tiny SQL bug
Diffstat (limited to 'util/dump.sql')
-rw-r--r--util/dump.sql2
1 files changed, 1 insertions, 1 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;