no, i have my functions in classes.
and i want to know how you would go about updating the current amount of replies in a thread, such as this one, like when you are looking at the OOP help thread it says 2 replies next to my thread (now three)
i have a function that is supposed to update it, but it doesn't...
code:
function updateTopicTime($id){
$day = date("Y-m-d");
$time = date("g:i:s A");
$q = "UPDATE ".TBL_TOPICS." SET time = '$time', date = '$day', threads += '1' WHERE fid = '$id'";
mysql_query($q);
}
function addNewForumThread($fid, $topic, $uname, $text){
$day = date("Y-m-d");
$time = date("g:i:s A");
$this->updateTopicTime($fid);
$q = "INSERT INTO ".TBL_THREADS." VALUES ('$fid', '', '$topic', '$uname', '$text', '$day', '$time', '')";
mysql_query($q, $this->connection);
}