Author |
Topic |
sr_erick
Senior Member
USA
1318 Posts |
Posted - 18 September 2005 : 11:10:27
|
If you installed the beta mod I provided, when you are adding a forum just choose the parent forum in the category drop down list in the forum properties.< |
Erick Snowmobile Fanatics
|
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 19 September 2005 : 05:29:52
|
again some error and i didn't change anything since yesterday:
Microsoft OLE DB Provider for ODBC Drivers Fehler "80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-4.0.24_Debian-10]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 'LIMIT 1' at line 1
/forum/post.asp, line 648
here are the lines in question: 647 strSQL = "SELECT F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID & " LIMIT 1" 648 set rsFindSub = my_Conn.Execute(strSQL)
even a semicolon at the end of the string shows the same error< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
Edited by - ElPazzo on 19 September 2005 06:18:59 |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 19 September 2005 : 08:52:06
|
hold on... lack of caffein was making the keys move around...
I think (not being familiar with MySQL) that it should look more like either:
strSQL = "SELECT LIMIT 1 F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID & ";"
or:
strSQL = "SELECT F_PARENT LIMIT 1 FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID & ";"
But I'd need a little confirmation from somebody who uses a real DBMS < |
Edited by - AnonJr on 19 September 2005 08:57:11 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 19 September 2005 : 09:02:33
|
LIMIT is MySQL (maybe MSSQL as well) specific (and should be the last thing in your query). Try using Snitz's TopSQL function instead:
TopSQL(strSQL)
For ElPazzo's problem, though, it looks like strRqForumID either doesn't exist or doesn't hold a value. ElPazzo, try a response.write on the statement, see what it outputs.
< |
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.” |
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 19 September 2005 : 09:46:42
|
i put a respons.write just before line 647 and got this:
SELECT CAT_NAME, CAT_SUBSCRIPTION, CAT_MODERATION FROM FORUM_CATEGORY WHERE CAT_ID = 2< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 19 September 2005 : 09:50:55
|
what would the topsql string look like? < |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 19 September 2005 : 09:51:21
|
Place it after line 647 as that's the line that's causing the error.
< |
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.” |
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 19 September 2005 : 10:09:26
|
there it says this:
SELECT F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = LIMIT 1
seems you were right with the value< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 20 September 2005 : 09:42:40
|
how can i get rid of that problem mentionned above?< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 20 September 2005 : 11:33:30
|
Time to start rooting around and finding where the disappearing value went.... use your editors "find" feature and start looking for where it is assigned a value. Do a Response.write right after it to check if it really is being assigned, and go from there.< |
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 21 September 2005 : 04:49:16
|
tried putting this 'Response.write strRqForumID' behind every string at a time where i found strRqForumID in post.asp got no information when trying to create a new forum... no hint where the mistake is...< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 22 September 2005 : 06:49:39
|
I think i got the problem... when i try to create a new forum, this forum does not have an id yet, so the id to be inserted in line 648 CANNOT be found as it does not exist... how to get rid of that problem?
ps: when editing an existing forums properties there is no problem at all, it's just that i can't create new forums due to that problem.
sr_erick did you have that prob too?< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
Edited by - ElPazzo on 22 September 2005 06:51:53 |
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 22 September 2005 : 11:48:27
|
Got rid of the problem finally:
i just added some if not string just below the 'find out if this forum is a sub-forum!:
'Forum Parent! 'Find out if this forum is a sub-forum!
if not strRqMethod = "Forum" then strSQL = "SELECT F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID & " LIMIT 1" 'response.write strsql set rsFindSub = my_Conn.Execute(strSQL) if rsFindSub.eof then strSubForum = NULL else strSubForum = rsFindSub("F_PARENT") end if set rsFindSub = Nothing end if < |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
sr_erick
Senior Member
USA
1318 Posts |
Posted - 22 September 2005 : 12:47:28
|
quote: Originally posted by ElPazzo
I think i got the problem... when i try to create a new forum, this forum does not have an id yet, so the id to be inserted in line 648 CANNOT be found as it does not exist... how to get rid of that problem?
ps: when editing an existing forums properties there is no problem at all, it's just that i can't create new forums due to that problem.
sr_erick did you have that prob too?
I never had that problem, no.< |
Erick Snowmobile Fanatics
|
|
|
ElPazzo
Junior Member
Austria
116 Posts |
Posted - 24 September 2005 : 05:18:09
|
now i can add new forums again and assign them a parent forum but they are not shown as subforum but as normal ones :-(< |
www.pet-needs.com www.pet-needs.com/forum www.pet-needs.de www.translating-it.com |
|
|
Topic |
|