PHP - Comment Refresh Glitch. Mutliply Comments Need Help!
when i comment and reresh it resends the comment so i have done 2 comments and continues if i keep refreshing and just multiplies. how can i stop the fetch or while loop.
Code: [Select] <?php $query = ("SELECT * FROM homecomments"); $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { echo "<b>"; echo $row['username'] . "</b>: <Br> "; echo htmlentities($row['comment'], ENT_QUOTES, "UTF-8"); echo "<p>"; } ?> thats my echo comment code. would it ahve anything to do with that? Similar TutorialsCREATE TABLE posts ( postId INT(11) NOT NULL UNIQUE AUTO_INCREMENT, title VARCHAR(255) NOT NULL, author VARCHAR(24) NOT NULL, description TEXT NOT NULL, createdAt TIMESTAMP, PRIMARY KEY (postId) ); CREATE TABLE comments( commentId INT(11) NOT NULL UNIQUE AUTO_INCREMENT, comment TEXT NOT NULL, postId INT(11), userId INT(11), createdAt TIMESTAMP, PRIMARY KEY (commentId), FOREIGN KEY (userId) REFERENCES users(userId), FOREIGN KEY (postId) REFERENCES posts(postId) ); CREATE TABLE replies ( repId INT(11) NOT NULL UNIQUE AUTO_INCREMENT, reply TEXT NOT NULL, userId INT(11), commentId INT(11), createdAt TIMESTAMP, PRIMARY KEY (repId), FOREIGN KEY (userId) REFERENCES users(userId), FOREIGN KEY (commentId) REFERENCES comments(commentId) ); CREATE TABLE users ( userId INT(11) NOT NULL UNIQUE AUTO_INCREMENT, userName VARCHAR(100) NOT NULL,, email VARCHAR(100) NOT NULL, PRIMARY KEY (userId) ); how to retrive userName,comment, and createdAt from users and comments table while I have used userId as a Foreign key on the comment table if it isn't correct, correct me please I'm trying to get my head around oop and wondered if anyone would look at my comments so far . I want to learn a bit about constructors next but thought I should make sure I understand the below code properly first. Code: [Select] <?php class Dictionary { //new class public $translations = array(); public $type =" "; //new variables called 'PROPERTIES' function summarize() { //function within a class is called a 'METHOD' $ret = "Dictionary type: {$this->type}\n"; // {$this->type} means: use $type which is found within THIS class $ret .= "Terms: ".count( $this->translations )."\n"; // {$this->type} means: count the length of the $translation array which is found within THIS class return $ret; } } ?> Code: [Select] <?php include('class_dictionary.php'); //include file that holds the class $english = new Dictionary; // creating new object using the class called Dictionary $english->type = "EN"; // adding a value to the 'type' property located within the dictionary class $english->translations['TREE'] = "branch"; //adding TREE key and value branch to the translations array $english->translations['TREEtwo'] = "trunk"; //adding TREEtwo key and value trunk to the translations array $french = new Dictionary; //creating a new instance of the Dictionary object $french->type = "FR"; $french->translations['TREE'] = "arbre"; print_r( $english ); echo "<br/>"; print $english->summarize(); //prints the summarize method ?> I'm working on adding a threaded comment system to a website. The comments will be in reply to posts which are part of a post table. The comment table contains an auto incremented ID, a ThreadID that references the post its replying to and a CommentID that references which comment its replying to if it is a reply to a comment and is null if its a reply directly to the post. It also contains the comment obviously. I can get all the comments for a post and push each comment object into an array and return it to be displayed. What I'm stuck on though is having the comments nested. Any idea's I've came up with fall short of being able to be n level trees. I'm sure the answer is something to do with recursion but I can't think of how it would be implemented in this case. Any help or pointers would be great. I'm reading around but I thought I'd stop in here and ask as well. Thanks in advance. I have a problem with the "comments count" in the toggle link in my blog: www.albertosotophotography.com
I have this script for show/hide comments in main page:
<script type= "text/javascript"> // Show/Hide Comments jQuery(document).ready(function() { // Get #comments div var uniqueAppend = 1; var tempName = 'comments'; while(jQuery("#comments").length > 0 ){ jQuery("#comments").attr('id',tempName + uniqueAppend++).addClass('commentContainer') } var commentsDiv = jQuery('.commentContainer'); // Only do this work if that div isn't empty if (commentsDiv.length) { // Hide #comments div by default jQuery(commentsDiv).hide(); // Append a link to show/hide jQuery('<a/>') .attr('class', 'toggle-comments') .attr('href', '#') .html('Notes') .insertAfter(commentsDiv); // Encase button in .toggle-comments-container div jQuery('.toggle-comments').wrap(jQuery('<div/>', { class: 'toggle-comments-container' })) // When show/hide is clicked jQuery('.toggle-comments').on('click', function(e) { e.preventDefault(); // Show/hide the div using jQuery's toggle() var commentContainer = jQuery(this).parent('.toggle-comments-container').prev('.commentContainer'); jQuery(commentContainer).slideToggle('slow', function() { // change the text of the anchor var anchor = jQuery(commentContainer).siblings('.toggle-comments-container').children('.toggle-comments'); var anchorText = anchor.text() == 'Notes' ? 'Hide' : 'Notes'; jQuery(anchor).html(anchorText); }); }); } // End of commentsDiv.length }); // End of Show/Hide Comments </script>I use: .html('<?php comments_number( '0 notes', '1 note', '% notes' ); ?>')for name the "comments toggle link" with the count of comments for each single post. The problem is that all posts shows the same count: the comments presents in the first post. Someone can help me? Alberto This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=322815.0 The following block of code won't work. Code: [Select] $prob = $prob + 1; $_SESSION['prob']=$prob; header( 'Location: question' . $prob . '.php' ); This is just a small part of my script. I've made sure using print that $prob is 1 and is changed to 2. HOWEVER it gives me an error 404 page at question3, not question2. I'm trying to make a quiz system. Hi all, Thanks for reading. I'm running a script using jQuery that auto-refreshes a <div> on the index page from an external PHP script to get all the rows in a database and display them on the index page. The script works great - here it is as follows: Code: [Select] <script type="text/javascript"> $(document).ready(function() { $("#responsecontainer").fadeOut("fast").load("getrows.php").fadeIn("slow"); var refreshId = setInterval(function() { $("#responsecontainer").fadeOut("fast").load('getrows.php').fadeIn("slow"); }, 5000); $.ajaxSetup({ cache: false }); }); </script> The getrows.php script I'm working with looks like this: Code: [Select] <?php $rowsQuery = mysql_query("SELECT * FROM Happenings WHERE HappeningDate='$today'"); if (mysql_num_rows($rowsQuery) == 0) { $happeningsToday = "There are no happenings today."; } else { $allHappeningsToday = 1; while ($getHappeningsToday = mysql_fetch_array($rowsQuery)) { $happeningName = stripslashes($getHappeningsToday['HappeningName']); $happeningDate = $getHappeningsToday['HappeningDate']; $happeningDescription = $getHappeningsToday['HappeningDescription']; if ($allHappeningsToday == 1) { $happeningsToday .= " <div class=\"box\"> <p>".$happeningName." | ".$happeningDate." | ".$happeningDescription." </div>"; $allHappeningsToday = 2; } else { $happeningsToday .= " <div class=\"box\"> <p>".$happeningName." | ".$happeningDate." | ".$happeningDescription." </div>"; $allHappeningsToday = 1; } } } echo $happeningsToday; ?> This script works great as well. Currently, the auto-refresh jQuery script as you can see if getting and fading in/out all of the rows. Off of the above getrows.php script, is there a way after I could get only the newly created rows since the last refresh and only fade those in and out while leaving the others already loaded by the auto-refresh script to not fade in/out? Any ideas, thoughts or suggestions would be unbelievably helpful. Thank you very much. I have an issue with a form where people choose from several classes, and how many people they're enrolling. If they choose the first class, select the number of students and hit submit, it is supposed to carry the number of students to the 2nd page where a variable is created for it: $qty = $_POST['participantqty']; It works if they pick the first class and choose a number of students. It works if they pick the first class and another, plus the number of students for each. But if they choose any one class except the first one (and only that class), choose their number of students and submit... This is when it doesn't carry the number forward... It also glitches when they select two classes that don't include the first class. It carries the number of students for one, but not the other. qty_insert and qty_total on page two are where the data dissappears. I'm assuming it has something to do with the array, but I'm in a little over my head. On the second page, I added in print_r($myarray); and it shows the variable is passing to the second page. page one: Code: [Select] <form method="post" action="register2.php"> <? //output each row while ($c_row = mysql_fetch_array($result_all_events)){ $display = date("F j", strtotime($c_row['workshop_date'])) ; $i++; //date('d m y', strtotime($mysql_date)); ?> <input type="checkbox" name="workshop_id[]" value="<?= $c_row['workshop_id'] ?>" /> <?= $c_row['workshop_title'] ?> </td><td><?= $c_row['workshop_date'] ?></td><td><select name="participantqty[]" id="" class=""> <option value="">select</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="10">9</option> <option value="10">10</option> </select> $ <?= $c_row['workshop_price'] ?></td></tr><tr><td colspan=3><hr></td></tr> <? } //end while ?> <input type="submit" value="Submit" class="buttontype"> and on page two where it totals things up: Code: [Select] <form method="post" action="register3.php"> <?php // connect to database include("dbconnectionfile.php"); $fname = mysql_escape_string($_POST['fname']); $lname = mysql_escape_string($_POST['lname']); $address = mysql_escape_string($_POST['address1']); $address2 = mysql_escape_string($_POST['address2']); $city = mysql_escape_string($_POST['city']); $state = mysql_escape_string($_POST['state']); $zip = mysql_escape_string($_POST['zip']); $phone = mysql_escape_string($_POST['phone']); $fax = mysql_escape_string($_POST['fax']); $email = mysql_escape_string($_POST['email']); $hear = mysql_escape_string($_POST['hear']); $how1 = mysql_escape_string($_POST['how1']); $how2 = mysql_escape_string($_POST['how2']); $how3 = mysql_escape_string($_POST['how3']); $how4 = mysql_escape_string($_POST['how4']); $res = mysql_escape_string($_POST['resident']); if( $res == NULL ) { $res="No"; } $how = $how1 . $how2 . $how3 . $how4; $query_insertItem = "INSERT INTO tbl_registration (reg_fname, reg_lname, reg_address, reg_address2, reg_city, reg_state, reg_zip, reg_phone, reg_fax, reg_email, reg_how, reg_how_detail, reg_dc) VALUES ('$fname', '$lname', '$address', '$address2', '$city', '$state', '$zip', '$phone', '$fax', '$email', '$hear', '$how', '$res')"; $dberror = ""; $ret = mysql_query($query_insertItem); $reg_id = mysql_insert_id(); $id_reg = $reg_id; // store all posted intemnos and descriptions in local arrays $ids = $_POST['workshop_id']; $qty = $_POST['participantqty']; echo $qty; if(sizeof($_POST['workshop_id'])) { // loop through array $number = count($ids); for ($i=0; $i<=$number; $i++) { // store a single item number and description in local variables $itno = $ids[$i]; $qty_insert = $qty[$i]; $query_insertItemWorkshop = "INSERT INTO tbl_registration_workshop (registration_id, workshop_id, regworkshop_qty) VALUES ('$reg_id', '$itno', '$qty_insert')"; $dberror = ""; $ret = mysql_query($query_insertItemWorkshop); $query_selectAllItems_events = 'SELECT * FROM tbl_workshops where workshop_id = '.$itno; @$result_all_events = mysql_query($query_selectAllItems_events); @$numRows_all_events = mysql_num_rows($result_all_events); @$num=mysql_num_rows($result_all_events); @$z_row = mysql_fetch_array($result_all_events); $qty_total=$qty_insert*$z_row['workshop_price']; $total = $total + $qty_total; // the qty_insert and the qty_total below are what appear blank. if ($ids[$i] <> '') { echo "Description:</b> ". $z_row['workshop_title'] ." " . $qty_insert . " at ". $z_row['workshop_price'] ." each: </td><td valign=top> $". $qty_total ."<br>"; } } } ?> <input type="hidden" name="reg_id" value="<?= $id_reg ?>" /> <input type="hidden" name="total" value="<?= $total ?>" /> <input type="submit" value="Checkout now!" /></form> Code: [Select] <form name="commentbox" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <table border="0"> <textarea name="comment" cols="20" rows="2" onclick="document.commentbox.comment.value='';" onfocus="this.style.borderColor='yellow';" onblur="this.style.borderColor='blue';" />Comment...</textarea> </td></tr> $commentcheck = $_POST['comment']; if ($commentcheck == "Comment...") { die(' <META HTTP-EQUIV=\"Refresh\" CONTENT=\"1; URL=index.php\"> '); }else why does this not refresh if i comment "Comment..." it just dies and doesnt echo anything Hello! I'm trying to dive into Dreamweaver's code so that I can better understand what the heck it's doing in order to modify it to my specific needs. My PHP book is great, but it just seems like Dreamweaver's code is much more complicated than how I'd write it based on what I've read about PHP (Disclaimer: been with PHP for a week). It would be incredibly helpful if someone could write comments for each of the lines in terms of what it's doing (the more specific the better). I appreciate that this is a bit of a tedious question to ask, but it would be really appreciated. Thank you. Code: [Select] $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) { $insertSQL = sprintf("INSERT INTO users (first_name, last_name, user_type, email, school_id) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString($_POST['first_name'], "text"), GetSQLValueString($_POST['last_name'], "text"), GetSQLValueString($_POST['user_type'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['school_id'], "int")); mysql_select_db($database_connalgebra, $connalgebra); $Result1 = mysql_query($insertSQL, $connalgebra) or die(mysql_error()); // The code below gives the last autogenerated userid. $id = mysql_insert_id(); $updateusername = "UPDATE users SET username = CONCAT(first_name, $id) WHERE user_id = $id"; $Result2 = mysql_query($updateusername, $connalgebra) or die(mysql_error()); // $insertGoTo = "add_user.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } mysql_select_db($database_connalgebra, $connalgebra); $query_rsSchools = "SELECT school_id, school_state, school_city, school_name, school_country FROM schools ORDER BY school_name ASC"; $rsSchools = mysql_query($query_rsSchools, $connalgebra) or die(mysql_error()); $row_rsSchools = mysql_fetch_assoc($rsSchools); $totalRows_rsSchools = mysql_num_rows($rsSchools); Hello im trying to make a comment feature by having a link under my pictures kommentar.php?link=1 Then use the link=1 to see what comments that should be taken from the database. The comments have a linkid like this Linkid: Text: 1 a comment on first picture 1 another comment on first picture 2 a comment on second picture 2 another comment on second picture But i can't get my php to echo all the comments with the linkid of for example 1 without having to get them all separately. This is my script: <?php ob_start(); $host="localhost"; $username="****"; $password="******"; $db_name="db"; $tbl_name="comment"; mysql_connect($host, $username, $password)or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $linkid=filter_input(INPUT_GET,'link'); $sql="SELECT * FROM $tbl_name WHERE linkid='$linkid'"; $result=mysql_query($sql); $grejs=null; while(mysql_fetch_row($result)){ $grejs.="$row[0]"; } echo $grejs; ob_end_flush(); ?> Okay... Since my last post about the website I was working on, I've figured out what I was asking. But now, I've run into another problem... Once I have a functional form on my website where a user inputs data and presses submit, how do I go about getting it to remain posted where directed? So if the user types his first and last name and presses submit, how do I get their input to remain posted on the page, much like a guestbook? I'm a newbie at this stuff, but it's a must for mine and my partner's website. Thanks again! PS... I have the code for the form all typed out and it works, it just displays the data with $echo rather than posting it permanantly. Is it true that PHP Comments are hidden from end users? And is it dangerous to put extensive comments in your code (e.g. links to developer sites, article excerpts, etc)? I am re-factoring my website, and have found some really helpful articles that I'd like to post in my code so I don't forget what I'm doing 6 months from now, but don't want to cause any issues. (I know this sounds wimpy, but I am a newbie?!) Debbie Hello, I have built a blog in php but. On each article in the blog people are able to comment. I would now like to build a system where people can vote on the comment up/down with Ajax. In my comments database I have a table that looks like this: id / article_id / user_id / dateposted / comment / voteup / votedown I would like it to look like this: Any ideas how I can do this? Tutorials online? Thanks a million I have one small question about comments. say you have a code like this Code: [Select] <?php $lol = 1; $rofl = 2; $lmao = 3; // Above are my variable's echo 'this does not get executed because the apostrophy in the comment acts as the start'; ?> Now if I wrote this code the apostrophe in variable acts as a quote and does not end until it meets another to end it. Why does this do that? I thought that when you start a comment that whole line gets ignored. Could this possible be happening because of my text editor( I use textpad )? If so could you recommend a good text editor, thanks. Hi all, I have another uestion. I am currently working with an XML document that has some comments in it that need to stay however it is messing up my parser that I am working on. How can I get around this issue and make the php parser ignore the comments? here is a snippet of the code I am working on. php Code: [Select] //open XML file containing data for current slide $currentslidefilepath = "slides/xml/"; $currentslidefilepath .= $slides[$currentslide]; $currentSlideXml = simplexml_load_file($currentslidefilepath); XML Quote <!-- there are some comments here --> <Basic> <another>some data</another> </Basic> ok here is my script , for some reason , it adds the comment and all it works great , but it wont add it to the notifications table in my database Code: [Select] <?php include("../includes.php"); $session = $logOptions_id; if($session) { $to_id = $_POST['user_id']; $post_id = $_POST['post_id']; $comment = mysql_real_escape_string($_POST['comment']); $date = mktime(); mysql_query("INSERT INTO comments SET user_id='$to_id', from_id='$session', post_id='$post_id', comment='$comment', date='$date'"); $id = mysql_insert_id(); $query = mysql_query("SELECT * FROM comments WHERE post_id='$post_id' AND from_id!='$session' AND state='0' GROUP BY from_id"); if(mysql_num_rows($query)>0) { $row1 = mysql_fetch_assoc(mysql_query("SELECT * FROM posts WHERE id='$post_id'")); $post_from2 = $row1['from_id']; mysql_query("INSERT INTO notifications SET user_id='$post_from2', from_id='$session', post_id='$id', action_type='4', date='$date'"); while($row = mysql_fetch_array($query)) { $post_from = $row['from_id']; if($post_from!=$post_from2) { mysql_query("INSERT INTO notifications SET user_id='$post_from', from_id='$session', post_id='$id', action_type='4', date='$date'"); } } } else { $row1 = mysql_fetch_assoc(mysql_query("SELECT * FROM posts WHERE id='$post_id'")); $post_from = $row1['from_id']; mysql_query("INSERT INTO notifications SET user_id='$post_from', from_id='$session', post_id='$id', action_type='4', date='$date'"); } $query = mysql_query("SELECT * FROM comments WHERE id='$id' AND state='0'"); comments($query); } ?> What does this code do/mean? /* * @the vars array * @access private */ TomTees Hi I'm wondering how I can output nested comments. I have written a viewthread.php file that works nicely so far. From index.php it gets the IDOfThread and passes this to a $number then outputs all the comments assigned to the Thread ID However I'd like to be able to respond to each comment to create nested comments This is my viewthread.php so far <!DOCTYPE html> <html> <header> <link href="styles.css" rel="stylesheet" type="text/css" media="all"> <title>test Image Board</title> <div class="header"> <a href="index.php" class="logo">test forum online</a> <div class="header-right"> <a class="active" href="#home">Home</a> <a href="#news">News</a> <a href="#contact">Education</a> <a href="#about">Tech</a> </div> </div> </header> <body> <!-- <a href="CreateThread.php"> <h1>Create Thread</h1> </a> --> <div class ='Thread-grid-container'> <?php include 'dbconnect.php'; $number = intval($_GET['id']) ; session_start(); $_SESSION['id'] = $number ; $query = mysqli_query($conn, "SELECT * FROM Threads where id=$number") or die (mysqli_error($conn)); //Output Grid layout for a Thread post while ($row = mysqli_fetch_array($query)) { //output picture from upload folder $imageURL = 'upload/'.rawurlencode($row["filename"]); echo " <div class ='Thread-grid-item'> <div class='ThreadNumber'> Post {$row['id']}<br> </div> <div class='UserOnThread'>{$row['Users']} </div> <h2>{$row['Title']} </h2> <button type='button' class ='collapse'>Hide</button> <div class ='img-block'> <img src={$row['$imageURL']}$imageURL alt='' /> </div> <div class='bodytextThread'> <p>{$row['ThreadBody']}</p> </div> </div> \n"; }?> <div class="comment-upload-box"> <form action="CommentUpload.php" method="post" enctype="multipart/form-data"> <table> <tr> <td></td> </tr> <tr> <td>Comment: </td> <td> <textarea name="CommentText" cols="100" rows="10" > Enter your posts... </textarea> </td> <td></td> </tr> <tr> <td></td> <td><input type="submit" name='submit' value="Submit"/></td> <td></td> </tr> </table> </form> </div> <div class='divTableForComments'> <div class='divTableBody'> <?php include 'dbconnect.php'; //Output Comments onto page //Create a variable for the Comment boxes so when clicking reply a text area shows $ChildCommentBoxes = "<div class='child-comment-upload-box' style='margin-left: 48px'> <form action='ChildCommentUpload.php' method='post' enctype'multipart/form-data'> <table> <tr> <td></td> </tr> <tr> <td>Comment: </td> <td> <textarea name='ChildCommentText' cols='100' rows='10' > Enter your posts... </textarea> </td> <td></td> </tr> <tr> <td></td> <td><input type='submit' name='submit' value='Submit'/></td> <td></td> </tr> </table> </form>"; $query = mysqli_query($conn, "SELECT * FROM Posts where IDOfThread=$number") or die (mysqli_error($conn)); while ($row = mysqli_fetch_array($query)) { //May need this later to output pictures // $imageURL = 'upload/'.rawurlencode($row["filename"]); $CommentText = nl2br($row['CommentText']) ; $ParentComment = "" ; $replies = "" ; if (empty($row['ParentId'])) { $ParentComment .= " <div class='divTableRow'> <div class='divTableCell'>{$row['User']} <div class='pointsincommentbox'> {$row['Upvotes']}points</div> <div class='divTableComment'> $CommentText <br> <div class='divCommentLinks'> <div class='upvotes'> ⬆</div> <div class='upvotes'> ⬇</div> <div> view comment </div> <div>report </div> <div>permalink</div> <button type='button' class ='CommentChildButton'>reply</button> <div class ='OpenChildCommentBox'> $ChildCommentBoxes </div> </div> </div> </div> </div> \n"; } echo "$ParentComment "; } ?> <div class ="sidebar"> </div> </body> </html> <script> var coll = document.getElementsByClassName("collapse"); var i; for (i = 0; i < coll.length; i++) { coll[i].addEventListener("click", function() { this.classList.toggle("active"); var content = this.nextElementSibling; if (content.style.display === "block") { content.style.display = "none"; } else { content.style.display = "block"; } }); } </script> <script> var coll2 = document.getElementsByClassName("CommentChildButton"); var i; for (i = 0; i < coll2.length; i++) { coll2[i].addEventListener("click", function() { this.classList.toggle("active"); var content = this.nextElementSibling; if (content.style.display === "block ") { content.style.display = "none"; } else { content.style.display = "block"; } }); } </script> And this is what it looks like I think I would probably change the margin of the responses to jut them in a bit and am thinking the best way would be to create a function that cycles through and where it finds a ParentId of a comment matching the Posts.id it would then put this beneath it? My comments are stored in a table titled Posts and Posts looks like
MariaDB [test]> describe Posts ; +---------------+-----------------+------+-----+---------------------+-------------------------------+ | Field | Type | Null | Key | Default | Extra | +---------------+-----------------+------+-----+---------------------+-------------------------------+ | id | int(6) unsigned | NO | PRI | NULL | auto_increment | | User | varchar(30) | NO | | NULL | | | PostTimeStamp | timestamp | NO | | current_timestamp() | on update current_timestamp() | | CommentText | varchar(8000) | YES | | NULL | | | IDOfThread | int(11) | YES | | NULL | | | Upvotes | int(11) | NO | | 0 | | | ParentId | int(11) | YES | | NULL | | +---------------+-----------------+------+-----+---------------------+-------------------------------+ 7 rows in set (0.002 sec)
|