Forum Moderators: coopster
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /web/arwen8/public_html/forum/Sources/BoardIndex.php on line 221
Fatal error: Call to undefined function: boardindex() in /web/arwen8/public_html/forum/index.php on line 329
Any suggestions on where to start looking for a possible mistake? If any other information is needed, I'd be happy to provide it. Just don't know what anyone who can help may need to see from the scripts, etc. Again, I'll do my best to give any other information to get this fixed. Thanks so much.
Okay, Line 221 (including comment lines) reads:
list ($latestPostName,$latestPostID,$latestPostTime,$subject,$topicID,$numReplies,
line 222:
$latestPostRealName) = mysql_fetch_row($result3);
I deleted to pull line 221 and 222 together, and now here's those lines as well as a few lines preceding it, in case the problem may be located there.
$result3 = mysql_query("SELECT m.posterName,m.ID_MEMBER,m.posterTime,m.subject,t.ID_TOPIC,t.numReplies, mem.realName FROM {$db_prefix}topics as t LEFT JOIN {$db_prefix}messages as m ON (m.ID_MSG=t.ID_LAST_MSG) LEFT JOIN {$db_prefix}members as mem USING (ID_MEMBER) WHERE (t.ID_BOARD=$row_board[ID_BOARD]) ORDER BY m.posterTime DESC LIMIT 1");
if (mysql_num_rows($result3) > 0) {
list ($latestPostName,$latestPostID,$latestPostTime,$subject,$topicID,$numReplies,$latestPostRealName) = mysql_fetch_row($result3);
$result3sql = "SELECT m.posterName,m.ID_MEMBER,m.posterTime,m.subject,t.ID_TOPIC,t.numReplies, mem.realName FROM {$db_prefix}topics as t LEFT JOIN {$db_prefix}messages as m ON (m.ID_MSG=t.ID_LAST_MSG) LEFT JOIN {$db_prefix}members as mem USING (ID_MEMBER) WHERE (t.ID_BOARD=$row_board[ID_BOARD]) ORDER BY m.posterTime DESC LIMIT 1";
$result3 = mysql_query($result3sql);
if (mysql_num_rows($result3) > 0) {
list ($latestPostName,$latestPostID,$latestPostTime,$subject,$topicID,$numReplies,$latestPostRealName) = mysql_fetch_row($result3);
And then if that gives errors, look at which line it is... where the sql string is built, or somewhere else....
Also, that error further down the line will resolve when the first is resolved, by the looks of it.
It's spitting the dummy on that list() = mysql_fetch_array call, but that error is commonly because there's no ";" finishing the previous line of code.
Are you able to post the code for the complete if statement? Or a skeleton version? It might be failing on the case where there isn't >0 rows, and that;s where the problem could be....