http://www.atutor.ca/atutor/mantis/view.php?id=2584
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Wed, 28 Jun 2006 14:42:58 +0000 (14:42 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Wed, 28 Jun 2006 14:42:58 +0000 (14:42 -0000)
docs/blogs/post.php

index cb8a261..bfd2753 100644 (file)
@@ -45,7 +45,7 @@ if (isset($_POST['submit']) && $_SESSION['member_id']) {
                $sql = "INSERT INTO ".TABLE_PREFIX."blog_posts_comments VALUES (0, $id, $_SESSION[member_id], NOW(), $_POST[private], '$_POST[body]')";\r
                mysql_query($sql, $db);\r
                if (mysql_affected_rows($db) == 1) {\r
-                       $sql = "UPDATE ".TABLE_PREFIX."blog_posts SET num_comments=num_comments+1 WHERE id=$id";\r
+                       $sql = "UPDATE ".TABLE_PREFIX."blog_posts SET num_comments=num_comments+1 WHERE post_id=$id";\r
                        mysql_query($sql, $db);\r
                }\r
 \r