Chapter 16 Viewforum issue
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mod FROM forum_forum WHERE id = 2' at line 1
SELECT forum_name as name, forum_desc as description, forum_moderator as mod FROM forum_forum WHERE id = 2
I previously had searched how to fix a similar error for index.php but was fixed by replace mod with jod but there's no fix for this anywhere yet.
Nevermind I just fixed my own issue by searching all the files.
I had to go to functions.php and edit
function getForum($id) {
$sql = "SELECT forum_name as name, forum_desc as description, " .
"forum_moderator as mod ".
"FROM forum_forum ".
"WHERE id = " . $id;
$result = mysql_query($sql)
or die(mysql_error() . "<br>" . $sql);
$row = mysql_fetch_array($result);
return $row;
}
to
function getForum($id) {
$sql = "SELECT forum_name as name, forum_desc as description, " .
"forum_moderator as jod ".
"FROM forum_forum ".
"WHERE id = " . $id;
$result = mysql_query($sql)
or die(mysql_error() . "<br>" . $sql);
$row = mysql_fetch_array($result);
return $row;
}
|