I’m making a mini forum. Entries are saved in the “blog” table. The first post of a thread will contain extra info that the response posts don’t, such as the last comment time and author, # comments, and # views. My problem is that whenever I make a response post, the time stamp of the first post gets changed to the time the response post was made. Check out the code and the screenshot of the table.
// make new response post
$sql3 = "select * from members where ID=$viewerID";
$rs3 = mysql_query($sql3, $conn) or die ("Could not connect. <a href=\"$link\">Try again</a>.");
$row3 = mysql_fetch_array($rs3);
$lastAuthor = $row3["username"];
$sql3 = "insert into blog (startAuthor, message, thread, views) values (\"$lastAuthor\", \"$response\", \"$threadID\", -1)";
$result3 = @mysql_query($sql3, $conn) or die("Could not post thread. <a href=\"$link\">Try again.</a>");
// update first post's info
$sql3 = "update blog set comments = comments + 1 where ID = $threadID";
$result = @mysql_query($sql3, $conn) or die("Could not post thread. <a href=\"$link\">Try again.</a>");
$sql3 = "update blog set lastAuthor = \"$lastAuthor\" where ID = $threadID";
$result3 = @mysql_query($sql3, $conn) or die("Could not post thread. <a href=\"$link\">Try again.</a>");
$lastTime = date("YmdHis");
$sql3 = "update blog set lastTime = \"$lastTime\" where ID = $threadID";
$result3 = @mysql_query($sql3, $conn) or die("Could not post thread. <a href=\"$link\">Try again.</a>");