News:

Wondering if this will always be free?  See why free is better.

Main Menu

Database error

Started by JamesRyzon, January 29, 2006, 11:59:58 PM

Previous topic - Next topic

JamesRyzon

Greets, love the look of the forum

i recently installed SMF 1.1 RC2 and I can not browse boards (To see/post topics) everything else works.

I get a database error:

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 ' 1, 4)' at line 3
File: /home/content/J/a/m/JamesRyzon/html/forums/Sources/MessageIndex.php
Line: 102

JamesRyzon

After checking into it myself i was able to fix it, i made the following change


REPLACE INTO {$db_prefix}log_boards
(ID_MSG, ID_MEMBER, ID_BOARD)
VALUES ($modSettings[maxMsgID], $ID_MEMBER, $board)", __FILE__, __LINE__);
if (!empty($board_info['parent_boards']))


to



REPLACE INTO {$db_prefix}log_boards
(ID_MSG, ID_MEMBER, ID_BOARD)
VALUES ('$modSettings[maxMsgID]', '$ID_MEMBER', '$board')", __FILE__, __LINE__);
if (!empty($board_info['parent_boards']))


i dont know why quoting the variables like that fixed it, but i hope this helps someone else later

traffic_light

I had the same problem, too.  Adding the quotes worked fine.

Advertisement: