Author |
Topic |
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 12 September 2003 : 06:08:26
|
Anyone got this working? I get an error on the sql-string...
SQLState: 42000 Native Error Code: 1064 [TCX][MyODBC]You have an error in your SQL syntax near '(FORUM_MEMBERS M INNER JOIN (FORUM_BOOKMARKS B INNER JOIN FORUM_TOPICS T ON B.B_' at line 1
The sql-string is:
strSql = "SELECT B.BOOKMARK_ID, C.CAT_NAME, F.F_SUBJECT, T.TOPIC_ID, T.T_SUBJECT, T.T_REPLIES, T.T_DATE, T.T_LAST_POST, M.M_NAME,T.FORUM_ID, T.CAT_ID, T.T_LAST_POST_AUTHOR FROM (FORUM_CATEGORY C INNER JOIN FORUM_FORUM F ON C.CAT_ID = F.CAT_ID) INNER JOIN ("& strMemberTablePrefix & "MEMBERS M INNER JOIN (FORUM_BOOKMARKS B INNER JOIN FORUM_TOPICS T ON B.B_TOPICID = T.TOPIC_ID) ON M.MEMBER_ID = T.T_AUTHOR) ON F.FORUM_ID = T.FORUM_ID WHERE (B.B_MEMBERID=" & getmemberID(strDBNTUserName) & ")" if lastDate <> "All" then strsql = strsql & " AND T.T_LAST_POST > '" & lastDate & "'"
I've searched and searched but no solution..
|
/Tribaliztic - www.gotlandrace.se -
|
Edited by - Davio on 12 September 2003 11:12:58 |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 12 September 2003 : 11:19:27
|
Change it to this:
strSql = "SELECT B.BOOKMARK_ID, C.CAT_NAME, F.F_SUBJECT, T.TOPIC_ID, T.T_SUBJECT, T.T_REPLIES, T.T_DATE, T.T_LAST_POST, M.M_NAME,T.FORUM_ID, T.CAT_ID, T.T_LAST_POST_AUTHOR FROM FORUM_CATEGORY C, FORUM_FORUM F, "& strMemberTablePrefix & "MEMBERS M, FORUM_BOOKMARKS B, FORUM_TOPICS T WHERE C.CAT_ID = F.CAT_ID AND B.B_TOPICID = T.TOPIC_ID AND M.MEMBER_ID = T.T_AUTHOR AND F.FORUM_ID = T.FORUM_ID AND B.B_MEMBERID=" & getmemberID(strDBNTUserName) if lastDate <> "All" then strsql = strsql & " AND T.T_LAST_POST > '" & lastDate & "'" |
Support Snitz Forums
|
|
|
tribaliztic
Senior Member
Sweden
1532 Posts |
Posted - 12 September 2003 : 15:22:30
|
Aaah.. works like a charm! Thanks alot! I'm pretty sure I've seen this topic before but couldn't find it anywhere..
|
/Tribaliztic - www.gotlandrace.se -
|
|
|
|
Topic |
|
|
|