Author |
Topic  |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 03 July 2012 : 06:03:36
|
After completing the "Sub-Forum Mod" I get the following error message when attempting to create a new forum. Any clues?
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-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 '1 F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = 0' at line 1
/tfp/post.asp, line 674
Here are lines 669 - 679 from my post.asp.
"<td bgColor=""" & strPopupTableColor & """>" & vbNewLine 'Forum Parent! 'Find out if this forum is a sub-forum! If strRqForumID = "" Then strRqForumID = 0 strSQL = "SELECT TOP 1 F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID set rsFindSub = my_Conn.Execute(strSQL) if rsFindSub.eof then strSubForum = NULL else strSubForum = rsFindSub("F_PARENT") end if
I am also including a link to my entire post.asp in txt format.
post.asp in txt format
Any help would be Soooo greatly appreciated!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
Edited by - MaGraham on 03 July 2012 06:04:41 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 03 July 2012 : 06:40:45
|
Replace this line:
strSQL = "SELECT TOP 1 F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID
by
strSQL = "SELECT F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID & " LIMIT 1"
|
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 03 July 2012 : 07:36:01
|
Or use the "TopSQL" function found in inc_func_common.asp so you don't have to worry about changing it again should you ever change the type of database you're using:strSql=TopSQL("SELECT F_PARENT FROM FORUM_FORUM WHERE FORUM_ID="&strRqForumID,1) |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 03 July 2012 : 10:57:06
|
quote: Originally posted by Shaggy
Or use the "TopSQL" function found in inc_func_common.asp so you don't have to worry about changing it again should you ever change the type of database you're using:strSql=TopSQL("SELECT F_PARENT FROM FORUM_FORUM WHERE FORUM_ID="&strRqForumID,1)
I think I like the idea of this one! Where is this located in the inc_func_common file, Shaggy?
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 03 July 2012 : 17:34:11
|
It's this routine:
|
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 04 July 2012 : 05:41:37
|
WONDERFUL! Thank you so much, Carefree!
I Sooooo appreciate you guys!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
|
Topic  |
|