Author |
Topic |
|
samyot
Junior Member
Canada
242 Posts |
Posted - 07 March 2005 : 11:59:56
|
Hi,
I just installed this MOD, very useful by the way!
I noticed that if splitting a reply with a \ (backslash), then new topic has it removed! On some replies, the backslash actually gives an error... -------------------------------------------------------------------- Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[MySQL][ODBC 3.51 Driver][mysqld-4.0.22-nt]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 '20050307114910', 1, 0(
/forum/post_info.asp, line 1062 --------------------------------------------------------------------
I am assuming this is because I am using a MYSQL database! |
Sylvain Amyot Forum | Home
MY OTHER SITES: http://www.mypcsecurity.ca http://www.mynature.ca http://www.myworkshop.ca http://www.toptechsites.com http://www.topsportsites.com http://www.mysportsforums.net
|
|
samyot
Junior Member
Canada
242 Posts |
Posted - 07 March 2005 : 12:34:58
|
I got it working by adding in post_info.asp:
'Insert reply info as new topic into Topic table strSql = "INSERT INTO " & strTablePrefix & "TOPICS (FORUM_ID" strSql = strSql & ", CAT_ID" strSql = strSql & ", T_SUBJECT" strSql = strSql & ", T_MESSAGE" strSql = strSql & ", T_AUTHOR" strSql = strSql & ", T_LAST_POST" strSql = strSql & ", T_LAST_POST_AUTHOR" strSql = strSql & ", T_LAST_POST_REPLY_ID" strSql = strSql & ", T_DATE" strSql = strSql & ", T_STATUS" strSql = strSql & ", T_IP" strSql = strSql & ", T_STICKY" strSql = strSql & ", T_SIG" strSql = strSql & ", T_ARCHIVE_FLAG" strSql = strSql & ", T_REPLIES" strSql = strSql & ", T_UREPLIES" strSql = strSql & ") VALUES (" strSql = strSql & NewForumID strSql = strSql & ", " & NewCatID strSql = strSql & ", '" & txtSubject & "'" strSql = strSql & ", '" & ChkString(Reply_Message,"sqlstring") & "'" strSql = strSql & ", " & Reply_Author strSql = strSql & ", '" & Reply_Date & "'" strSql = strSql & ", " & Reply_Author strSql = strSql & ", 0" strSql = strSql & ", '" & Reply_Date & "'" strSql = strSql & ", 1" strSql = strSql & ", '" & Reply_IP & "'" strSql = strSql & ", 0" strSql = strSql & ", " & Reply_Sig strSql = strSql & ", 1" strSql = strSql & ", 0" strSql = strSql & ", 0)"
Can someone verify this is OK? |
Sylvain Amyot Forum | Home
MY OTHER SITES: http://www.mypcsecurity.ca http://www.mynature.ca http://www.myworkshop.ca http://www.toptechsites.com http://www.topsportsites.com http://www.mysportsforums.net
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 07 March 2005 : 14:42:18
|
I'm using mysql and I am not having that problem.
The replies are already stored in your database. If someone originally made a post with a backslash, it would be stored with 2 blackslashes in mysql \\. So all that is needed would be to copy the contents of the post into the topic table.
If you pass it through the sqlstring function, you're going to end up with double quotes in your posts.
Are you sure it's the backslash that is giving the problem? Can you post a copy of the message so I can test it? Or put it in a txt file and post a link to the file. |
Support Snitz Forums
|
|
|
samyot
Junior Member
Canada
242 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 07 March 2005 : 15:03:20
|
The reply message that the error is reffering to. The message that has the backslash. |
Support Snitz Forums
|
|
|
samyot
Junior Member
Canada
242 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 07 March 2005 : 15:45:02
|
quote: Since I got it working with the changes I did above don't spend too much time on this!
Ok, how about you test a post with a single quote ' in your posts. Split them and see if you end up with double quotes. |
Support Snitz Forums
|
|
|
samyot
Junior Member
Canada
242 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 07 March 2005 : 15:55:37
|
Very strange, as that was the problem before with access users. I'm puzzled. Will have to test it again. |
Support Snitz Forums
|
|
|
|
Topic |
|