From 626eeb406efd3d4cbaf4da0b5ea0a85c8e29d8f7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 13 Aug 2003 04:49:52 +0000 Subject: - Bugfix: use table prefix in comment module updates. Patch by Bart. --- update.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update.php b/update.php index 029d4ab08..5fd84c5db 100644 --- a/update.php +++ b/update.php @@ -273,12 +273,12 @@ function update_58() { function update_59() { - update_sql("ALTER TABLE comments ADD thread VARCHAR(255) NOT NULL"); + update_sql("ALTER TABLE {comments} ADD thread VARCHAR(255) NOT NULL"); - $result = db_query("SELECT DISTINCT(nid) FROM comments WHERE thread = ''"); + $result = db_query("SELECT DISTINCT(nid) FROM {comments} WHERE thread = ''"); while ($node = db_fetch_object($result)) { - $result2 = db_query("SELECT cid, pid FROM comments where nid = '%d' ORDER BY timestamp", $node->nid); + $result2 = db_query("SELECT cid, pid FROM {comments} where nid = '%d' ORDER BY timestamp", $node->nid); $comments = array(); while ($comment = db_fetch_object($result2)) { $comments[$comment->cid] = $comment; @@ -302,7 +302,7 @@ function update_59() { } $thread = implode(".", $new_parts); - db_query("UPDATE comments SET thread = '%s' WHERE cid = '%d'", $thread."/", $comments[$cid]->cid); + db_query("UPDATE {comments} SET thread = '%s' WHERE cid = '%d'", $thread."/", $comments[$cid]->cid); } } } -- cgit v1.2.3