summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-08-13 04:49:52 +0000
committerDries Buytaert <dries@buytaert.net>2003-08-13 04:49:52 +0000
commit626eeb406efd3d4cbaf4da0b5ea0a85c8e29d8f7 (patch)
treefe3a59086480c316976367d3ee77d794d8a6d9ec
parent48805032c8bbcf45f65687c592438e2cc960ece8 (diff)
downloadbrdo-626eeb406efd3d4cbaf4da0b5ea0a85c8e29d8f7.tar.gz
brdo-626eeb406efd3d4cbaf4da0b5ea0a85c8e29d8f7.tar.bz2
- Bugfix: use table prefix in comment module updates. Patch by Bart.
-rw-r--r--update.php8
1 files 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);
}
}
}