Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/52538?pagenum=1
04 November 2025, 18:00
Topic
sr_erick
Sub-Forums Mod
16 April 2004, 13:44
Ok, I think this has been discussed in the past, but I'm not sure where it went, or what ever happened to the idea. Basically the way this forum works (to my understanding) you have a tree structure like the following:
Discussion Area -Categories --Forums ---Topics ----Posts
My proposed Idea is to do something similar to what vBulletin does with thier Sub-Forum idea. Basically a sub-forum inside a forum, and then you can have more sub-forums inside of sub-forums, however deep you want. I have come really need something like this on my website, and have been thinking about it for quite some time.
The result would be something like the following:
Discussion Area - Category -- Forum --- Topic ---- Post
--- SubForum ---- Topic ------ Post
---- SubForum ----- Topic ------- Post Notice how SubForum sits inside of Forum and the green tree(another subforum) sits inside the first SubForum which is in the Forum. I'm not sure if anyone has a mod already, or whats going on, but if not I'm going to start working on/organizing such a mod because I think it would be most helpfull for me, and many others.
Basically all I think a person would need to do is create another column in the FORUM_FORUMS table (I think that's the one) which would specify a parent forum (Its ID). All forums falling directly under the main categories would have no value, so they would be "root" forums.
Let me know what you think.
<
Replies ...
laser
16 April 2004, 16:51
Basically all I think a person would need to do is create another column in the FORUM_FORUMS table (I think that's the one) which would specify a parent forum (Its ID). All forums falling directly under the main categories would have no value, so they would be "root" forums.
That's exactly the way I was thinking of it while reading your thread. Same as you, I've seen a lot of requests, but no solutions.
I don't need it on my site (that I can think of ) but I'm happy to test it for you.<
altisdesign
16 April 2004, 17:42
Sounds good. You would probably have to modify various functions with regard to deleting forums, so if you delete the forum containing a sub forum what happens etc. But its only minor details. As far as I know invisionboard only allows one level of subforum.. I can see that being a useful add on for Snitz. Personally I would never use more than one level of subforum, and it would be more complicated to code, but if you think it would be useful to have sub-sub forums it would be a great additional feature for the mod .<
Jezmeister
16 April 2004, 17:44
ive never seen one either, i wouldnt mind testing it either - it could be a useful addition to 123 Chat forums...<
sr_erick
16 April 2004, 20:09
I'll probably get started on it this weekend, if I have time.<
OneWayMule
16 April 2004, 20:52
Although I'm, familiar with sub-forums from VB, and to be honest they cause more confusion instead if naking it all more organized; take a look at this forum
Looking forward to your work. I hope you'll make it available. <
RichardKinser
16 April 2004, 21:04
Kal Corp made something similar awhile back, not sure if it's still available though (it was for an older version):
OneWayMule, that's an insane amount of subforums. I'd only use it for 1 or two, to try keep my default page smaller.<
PeeWee.Inc
17 April 2004, 05:15
You can look at goand.net and how it's done there.
This is not a snitz forum, but it was once and worked the same way when it was <
sr_erick
18 April 2004, 02:12
Should I restrict it to one Sub level or make it virtually unlimited?<
sr_erick
18 April 2004, 03:13
I decided to go unlimited levels, just for future expansion....unless others are against it. I have an issue though...
To get the correct navigation for a subforum in a subforum, I got the looping to work, but it does it backwards, and either it's too late for me to think, but I can't figure out how to get it to go the other way around. Here's what I have.
Code:
strSql = "SELECT PARENT_ID, F_SUBJECT FROM " & strTablePrefix & "FORUM WHERE FORUM_ID = " & Forum_ID & ";" set rsSForum = my_Conn.Execute (StrSql)
if rsSForum.eof or rsSForum.bof then '#Do Nothing else strTempParentPath = rsSForum("PARENT_ID") do until strTempParentPath = 0
strSql = "SELECT PARENT_ID, F_SUBJECT FROM " & strTablePrefix & "FORUM" strSQL = strSQL & " WHERE FORUM_ID = " & strTempParentPath & ";" set rsSForum2 = my_Conn.Execute (StrSql)
if Cat_Status <> 0 then Response.Write getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") else Response.Write getCurrentIcon(strIconFolderClosed,"","align=""absmiddle""") end if
If this can't easily be solved I'll just forget the multi-level subforum in subforum, etc..
BTW, here is a link to what I have so far. http://www.dbfanatics.com/newforum/default.asp Go into the shop area.<
DavidRhodes
18 April 2004, 14:13
Do you need to order by the F_ORDER column IN FORUM_FORUM?<
wii
18 April 2004, 16:28
This change will make it harder for newbies to use the forum, I wouldn´t recommend this change because of lower usability.<
sr_erick
18 April 2004, 16:31
Originally posted by wii This change will make it harder for newbies to use the forum, I wouldn´t recommend this change because of lower usability.
I wouldn't nessesarily say this. It's a rather simple concept to understand and anyone with a general logical understanding of folder structures should be able to figure it out.<
Nertz
19 April 2004, 08:20
Eric, I had a look at the link you posted, and I think it looks great. I would however suggest, if it is possible and not too hard, to show the number of subforums in the table cell under the description of the forum. Eg., beneath the description of the "Shop", 3 subforums.
Keep up the great work, looking forward for its release.
cheers, Nat<
Etymon
22 April 2004, 00:31
Originally posted by RichardKinser Kal Corp made something similar awhile back, not sure if it's still available though (it was for an older version):
Below is the link you need for the original files of this MOD by Kal Corp (however, Snitz version 3.1 - I think).
http://vasserver.dyndns.org:88/vasdn/forums/topic.asp?TOPIC_ID=218
Read the topic's discussion at that link. Kal did express interest in perhaps updating it to 3.4 code. Maybe ask him if he already has it in the works. Might save you some time. He writes some nice MODs. [^]
<
sr_erick
23 April 2004, 02:23
It doesn't sound like Kal has any plans to continue development on his mod so I will continue working on this one.<
OneWayMule
01 May 2004, 13:17
Originally posted by sr_erick It doesn't sound like Kal has any plans to continue development on his mod so I will continue working on this one.
Looking forward to it, if you need testers, let me know! <
sr_erick
03 May 2004, 00:22
Haven't had much time to work on it lately and I don't see much happening this week as it is the start of finals week...perhaps in the following weeks I will have time to tinker around with it. <
sinbad911
10 May 2004, 08:45
Where can i download Snitz that was added this MOD, i can't add this MOD into my snitz ..<
danch
11 May 2004, 05:40
Any news on this mod as I am looking for this, seems to work great on your test forum, what is needed to finish?
Great MOD BTW
Daniel<
sr_erick
11 May 2004, 12:21
I still have quite a bit of work left to do on it as I haven't had much time to tinker with it lately.<
filo_2k
30 May 2004, 05:48
is it possible to have the code of what is done till now? maybe i can work on it too...
(sorry for may terrible english)<
sinbad911
30 May 2004, 09:06
Originally posted by filo_2k is it possible to have the code of what is done till now? maybe i can work on it too...
(sorry for may terrible english)
http://www.dbfanatics.com/newforum/forum.asp?FORUM_ID=1 <-- can anybody send me the full source like this site ?
i can't add it to my site <
wizard
01 June 2004, 05:42
This is great. How is it going? I have been looking and asking for this here for ages! Would it be possible to mail the code to me at chrisatrebas@hotmail.com
Thanks!
<
stuF
01 June 2004, 11:26
just a quick suggestion.
In the initial forum, it is possible to have both topics, and subforums, so if both of these were present, it would be very hard to idfferenciatew the two if they were part of the same table.
Ive seen on other forums which have sub-forums, there is a seperate table, above that with the posts which clearly defines the sub-forums.
<
filo_2k
22 June 2004, 05:02
....up<
SmileyMe
25 June 2004, 17:30
How's the progress? Any estimates on release dates?
<
OneWayMule
06 September 2004, 05:59
Hey Erick, any idea when we can expect a release or at least some code to play with? <
miperez
16 September 2004, 03:26
I am also willing to have more news about this. <
sr_erick
17 September 2004, 09:45
Sorry, I haven't made any headway at all. Just not enough time to invest into it. <
sr_erick
17 September 2004, 13:12
I'm sure I'll be getting around to it soon as I am in the middle of "redoing" my website and well, that is on the list of things to do. I'll see if I can just schedule that to be my next thing to work on. <
sr_erick
20 September 2004, 02:03
I made a lot of progress on it yesterday. I'll try and get a beta forum set up for people to play with at some point later today. There's still a lot of work to be done. It doesn't seem like that much at first, but once you get going on it you find tons of things you have to deal with.<
Tiggerz
20 September 2004, 19:22
I was just thinking about this and from the usability side I dont think the idea of sub-forums is a good one.
It seems to me that what is really wanted is a sub-topic rather than a sub-forum. Its kind of like implementing a usenet fork (if anyone is familiar with that).
So category.forum.topic.posts and category.forum.topic.subtopic.posts
So when the user is viewing the .topic.posts level, they would also see any subtopics that were available as well.
subtopics would be sorted so they display at the top before or after stickies.
Probably only admins should be able to make subtopics.
<
sr_erick
20 September 2004, 21:03
This isn't a sub topic, it's:
Category, Forum, Topic
OR
Category, Forum, Sub-Forum, Topic
All the other major forum systems out there use them and they are a great idea to split up a subject even more without cluttering your default page with 50000 seperate forums.<
Gargoyle
20 September 2004, 21:25
I think it's a great idea especially for those of us with sites that could possibly have hundreds of different categories.
I believe sr erick runs a snomobile forum in which case this would be VERY useful to him.
Also WeeWeeSlap runs a coaster forum that could definitly benifit from a MOD like this.
Then you have all of those guys that have their own modded forum forums. Those guys could benifit from this as well!
It is an effort well worth undertaking in my opinion. <
Tiggerz
20 September 2004, 21:46
There is no difference between the two. Try not to place a user concept on an actual concept. If you try and implement sub-forums - then you will add way more overhead for what amounts to conceptual relabing of terms.
The only addition would be that users have to subscribe to sub-forums, but then you can make them subscribe to subtopics - so no difference.
Sounds like people are trying to over-engineer the solution :)
<
sr_erick
20 September 2004, 22:50
Either I don't understand, or you don't, but I don't see how this is confusing or in any way over-engineering something. This is the only solution I have besides creating yet another Category, which I don't want to because there are already too many on the default page.
The way my particular case is going to work is something like this...
Category: Snowmobiles --Forum: The Shop ----SubForum: Clutching ------Topic: How to properly clutch a snowmobile ------Topic: What weights do I use?
----Topic: How much horsepower does my snowmobile have?
----Topic: I'm lost..HELP!
You will not see topics from the SubForum inside of the forum, you have to go inside of the SubForum to see any topics from there. I don't know why your saying this is confusing from even a users point of view. Subscriptions would work the same. You can subscribe per topic, or forum, but subscribing per forum would not automatically subscribe you to SubForums.
What would your propose the solution is then...if this isn't it?
<
miperez
21 September 2004, 03:49
IMHO you are talking about the same functionality, the only difference is how you call things. I think that what you call: ----SubForum: Clutching ------Topic: How to properly clutch a snowmobile ------Topic: What weights do I use?
----Topic: How much horsepower does my snowmobile have?
Is what tiggerz would call: ----Topic: Clutching ------Subtopic: How to properly clutch a snowmobile ------Subtopic: What weights do I use?
----Topic: How much horsepower does my snowmobile have?<
miperez
21 September 2004, 03:50
BTW, this will make my life much easier, you can call it "subforum", "subtopic", or "the muppets", I'm really gonna love it no matter how it's called!! <
Tiggerz
21 September 2004, 05:16
yep - it is the same thing put that way. Now if you abstract out current functionality, you should find existing code (or close to it) can be used to implement it :)
I dont use the term subforum because its not the correct (in my opinion) terminology to use.
To me - subforum means to place (for example) an entire copy/implementation of the snitzforums inside another copy of the snitsforums. Complete with all functionality (registrations, users etc).
Where in reality all that is actually required is recursive nesting of topics/posts.<
sr_erick
21 September 2004, 10:51
In the context in which "forum" is used, it is appropriate to use "subforum". (imo)
People like Jelsoft and Invision use it all the time as well. It seems appropriate to me.<
-gary
21 September 2004, 11:29
I like the idea, but only for disciplined users. I just recently cut back the number of forums simply because I couldn't get users to read the friggin descriptions for the forums we did have. They'd post whatever wherever they happened to be with no thought to structure or ease of others finding the information. After moving 10% of the posts per day, I gave up. I couldn’t imagine having subforums since the idea of a category/forum system seems to be way over my users heads.<
-gary
21 September 2004, 15:25
I was just looking at the dev board for phpBB 2.2 and they seem to have gone completely away from the category/forum concept to strictly forum/subforums. Quite confusing when you realize that everything you thought was a category is actually a forum with posts of it's own.<
Tiggerz
21 September 2004, 19:04
(not knowing anything about it ) I would wonder why they would have done that (from a usability point of view).
Perhaps it allows them to define one schema and have multiple instances (one for each forum). I'm thinking Object Oriented Database techniques here - didnt think that concept has come over to relational DBs yet.
<
sr_erick
21 September 2004, 23:15
Here's a link to what I've got thus far.
http://www.snowmobilefanatics.com/sample
You can log in as snitz/snitz to test if you like. There are a majority of things not completed yet...
First I guess is to get the new posts icon working. Small things like that.
As a side note, I don't intend to go hog wild with subforums, I think a person should limit them per forum. Too many places to post isn't good. Your right, it can get confusing, but the key is self control. Go easy on it and people won't have a hard time.<
suzypud
23 September 2004, 05:47
Looking forward to using this mod when finished - good work!
Thanks in advance - this will be very useful.
Suzy<
Gargoyle
23 September 2004, 19:09
Looks cool!! <
-gary
27 September 2004, 15:50
I gather that you are just showing each level of forums with no regard to what's underneath them?
Does anyone have any idea how to pull a heiarchy of forums that's related back to the same table so that even on the first page, you have rows for the forums below your current view in one SQL pull?
An example would be forum numbers 0, 1 and 2. Forum 0 would have a parent of 0 or null, forum 1 would have a parent forum of 0 and forum 2 would have a parent forum of 1.
How can I determine that 2 is a sub-forum of 0 without storing needless relational records in another table?<
Gargoyle
19 October 2004, 23:43
How ya doing on this Sr erik ??<
wizard
14 November 2004, 21:47
Just shamelessly checking if the MOD happens to be ready.....
<
Gargoyle
19 December 2004, 13:22
errr... Did this get dropped ??<
Dubie
29 December 2004, 06:26
Was there even/ever a working beta of this mod?<
rpainter
29 June 2005, 14:07
sr_erick,
I see that this is working on your site now. Do you have a MOD that we can download for this? I would love to add it to my site. Thanks.<
OneGuyFromBarlick
13 September 2005, 06:39
While clearing out an old hard drive I came across an old MOD called sub-forums for Snitz, unfortunatly there is no documentation in the zip file nor the database fields required, however the files are commented well enough for someone who knows what they are doing to try this mod out.
I've put the zip file up on my site and it can be downloaded at http://www.oneguyfrombarlick.co.uk/temp/subforums.zip, let me know how you get on with it.
<
ElPazzo
14 September 2005, 11:00
hi,
thx for the files oneguyfrombarlick. i'll have a closer look at it if i have more time. but i already changed the documents so that code will be coorectly displayed. when i opened it, it show the code for &. < and > instead of the signs. so now it's easier to work on it.
the changed docs can be downloaded at:
Sr_erick, have you had a chance to make any progress on this?<
Podge
16 September 2005, 13:30
I spent a few hours on this yesterday and hope to do some more over the weekend. To be honest I only looked briefly at the version posted here. I started from scratch and my version below is far from finished. I'm posting it here because I would like a bit of feedback before I continue.
The way I intend to do it requires an extra field in the FORUM_FORUM table which specifies if a forum has a parent. This has the benefit of allowing multiple subforum or sublinks e.g. a subforum can have multiple subforums which can have multiple subforums and so on. It also means that a lot of code present in Snitz is reusable or only requires a little modification.
There are a few things which I haven't fixed yet which you may notice.
1. Subforums admin options displays the wrong forum id 2. The text "Subforums" is repeated (will be fixed soon) 3. Navigation on the top left doesn't always display parent forums (not sure if it should either especially if there are a lot of parent forums)
Have a look at - http://forums.celtix.net/default.asp and let me know what you think.
Suggestions on layout / features / etc are welcome.<
AnonJr
16 September 2005, 13:50
Got a link to the code? I'd like to look at it over the weekend. I've got a point of reference (author to remain anonymous) that I could use to help out... unfortunatly its on the intranet.
I have some reservations about allowing unlimited sub-forums though... Just one level deep is hard enough for some people.<
Podge
16 September 2005, 13:58
Not at the moment, its very very rough. Maybe over the weekend when it comes together a bit more.
I'm un-decided whether to allow subforums of subforums or not. I have installed a dotnet forum which has unlimited forums and it works quite well. Navigation is horizontal and wraps around if you have a lot of subforums. I don't want to rule it out yet as it may be required by some people and it would be a lot harder to add it in later.
<
AnonJr
16 September 2005, 14:28
Let me know when it gets a bit closer. I may put what I've got up at The Warsong Records Forum... though I will confess to building on someone else's work.
I still can't think of too many reasons to put more than one or two levels of sub-forums though.<
Podge
16 September 2005, 14:50
Just after thinking of something else. If a main forum is deleted do all forums and topics below it also get deleted? This would require a recursive query and users may delete forums which they did not wish to delete by accident.
Deleted subforums could be moved to a garbage forum instead. This would be a lot easier to do as;
At the moment a "main" forum has a parent of 0 (which can only be displayed on default.asp) A sub forum has a parent (the forum_id) and can only be displayed on forum.asp A garbage forum could have a forum_id of -1 and can only be displayed on default.asp.
To move deleted forums to it all that would be required would be to set the parent id of the topmost subforums to -1. All other subforums beneath them would automatically move there too.<
AnonJr
16 September 2005, 14:55
Hmmmmm... hadn't thought about what would happen if I deleted the parent forum... [prepares to backup and test on the test forum]<
AnonJr
16 September 2005, 15:04
unh. New bug to fix....
Maybe on fourm deletion add a check - If it has children forums, re-set thier parent nuber to that of their parent, and give them the parent's category number too.
That way if you scale it to multiple sub-forums it would simply move them up a level. If they get moved up to the top level, they would inherit the parent's category.<
sr_erick
16 September 2005, 19:49
Hello all, I see work continues on this. I hadn't seen this topic was bumped until tonight. Unfortunately I don't have the time to dedicate to work on mods for this version of Snitz. I have emailed the partially completed mod to those who have requested it via email but since I see there is an effort going on here to complete such a mod, I will offer it for download.
http://www.snowmobilefanatics.com/downloads/subforums.zip
There is a crude set of instructions which should help you get installed what exists. Full functionality isn't yet completed. I basically got it working to a point that did what I personally needed for my site, and left it at that as time has always been short for me. Feel free to modify, change, or add any of the code. I know there are a few issues with it, but you guys are smart and should figure it out.
Podge, feel free to take whatever you want from it, or take nothing. It's up to you. I have limited it to one level of sub forum though. It's a lot easier to do the navigation this way.<
Podge
16 September 2005, 20:26
Thanks sr_erick, I'll have a look at it over the weekend.<
ElPazzo
17 September 2005, 09:37
Hi.
i get this msg after implementing sr_ericks sub-forum mod... did everything as explained in the txt.
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 'WHERE F_PARENT IS NULL ORDER BY F.F_ORDER ASC, F.F_SUBJECT ASC'
/forum/Default.asp, line 242 <
Podge
17 September 2005, 10:06
Can you response.write the strsql just before its executed on line 242?
e.g. add this
response.write strsql<
ElPazzo
17 September 2005, 10:52
this is what is writes down:
SELECT F.FORUM_ID, F.F_STATUS, F.CAT_ID, F.F_SUBJECT, F.F_URL, F.F_TOPICS, F.F_COUNT, F.F_LAST_POST, F.F_LAST_POST_TOPIC_ID, F.F_LAST_POST_REPLY_ID, F.F_TYPE, F.F_ORDER, F.F_A_COUNT, F.F_SUBSCRIPTION, F_PRIVATEFORUMS, F_PASSWORD_NEW, M.MEMBER_ID, M.M_NAME, T.T_REPLIES, T.T_UREPLIES, F.F_DESCRIPTION, F.F_PARENT FROM ((FORUM_FORUM F LEFT JOIN FORUM_MEMBERS M ON F.F_LAST_POST_AUTHOR = M.MEMBER_ID) LEFT JOIN FORUM_TOPICS T ON F.F_LAST_POST_TOPIC_ID = T.TOPIC_ID) WHERE F.CAT_ID = 0 OR F.CAT_ID = 11 OR F.CAT_ID = 8 OR F.CAT_ID = 10 OR F.CAT_ID = 9 WHERE F_PARENT IS NULL<
AnonJr
17 September 2005, 12:14
Needs to be WHERE F.F_PARENT IS NULL - you were missing the F.
If you haven't already, use this to add it to your table, or just add it to the zip to make it easier for others:
Just get rid of the ".txt" at the end and run the Mod setup to add the field.<
ElPazzo
17 September 2005, 12:22
does not work either... i already added the row in the table, thx<
AnonJr
17 September 2005, 13:35
hmmm... got a link to a text version of default.asp?<
ElPazzo
17 September 2005, 13:38
here it is
http://www.pet-needs.com/forum/default.txt<
AnonJr
17 September 2005, 13:44
duh! Its right in front of me ... and I didn't have to open the txt file You've got two "WHERE"'s in your SQL statement. I'll look at the file and see if I can figure out why.
(Definatly time to make a new pot of coffee!)<
AnonJr
17 September 2005, 13:58
Do you have the group categories enabled?
I've got the same code for that portion, but I don't have Group categories on... it looks like that is where the extra "Where" is comming from....
Stay tuned for a solution! <
ElPazzo
17 September 2005, 14:19
yes group categories are on... i need because i have various languages in my forum<
AnonJr
17 September 2005, 14:28
I think this should do it... we just need to consolodate a little code...
you see this above the actual connection:
Code:
'############################## Group Cat MoD ##################################### if Cat_ID <> "" then strSql = strSql & " WHERE F.CAT_ID = " & Cat_ID else if Group > 1 and strGroupCategories = "1" then strSql = strSql & " WHERE F.CAT_ID = 0" if recGroupCatCount <> "" then for iGroupCat = 0 to recGroupCatCount strSql = strSql & " OR F.CAT_ID = " & allGroupCatData(1, iGroupCat) next end if end if end if '############################## Group Cat MoD ##################################### if Cat_ID <> "" then strSql = strSql & " AND F_PARENT IS NULL" else strSql = strSql & " WHERE F_PARENT IS NULL" end if strSql = strSql & " ORDER BY F.F_ORDER ASC, F.F_SUBJECT ASC;"
We just need to change it all to:
Code:
'############################## Group Cat MoD ##################################### if Cat_ID <> "" then strSql = strSql & " WHERE F.CAT_ID = " & Cat_ID & " AND F.F_PARENT IS NULL" else if Group > 1 and strGroupCategories = "1" then strSql = strSql & " WHERE F.F_PARENT IS NULL AND F.CAT_ID = 0" if recGroupCatCount <> "" then for iGroupCat = 0 to recGroupCatCount strSql = strSql & " OR F.CAT_ID = " & allGroupCatData(1, iGroupCat) next end if end if end if '############################## Group Cat MoD #####################################
strSql = strSql & " ORDER BY F.F_ORDER ASC, F.F_SUBJECT ASC;"
That should stop the extra "WHERE" from appearing... just keep in mind this isn't tested, and as always - backup! Let me know if it works.<
AnonJr
17 September 2005, 14:36
In retrospect, it could have been simpler to change:
Code:
if Cat_ID <> "" then strSql = strSql & " AND F_PARENT IS NULL" else strSql = strSql & " WHERE F_PARENT IS NULL" end if strSql = strSql & " ORDER BY F.F_ORDER ASC, F.F_SUBJECT ASC;"
To:
Code:
strSql = strSql & " AND F.F_PARENT IS NULL ORDER BY F.F_ORDER ASC, F.F_SUBJECT ASC;"
But hind-sight is always 20/20 (ed. for typeo - ie lack of coffee)<
ElPazzo
17 September 2005, 14:45
forum now itself works... when i try to edit forum properties i get this:
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 '1 F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = '12'' at line 1
/forum/post.asp, line 648
here a link to txt file:
http://www.pet-needs.com/forum/post.txt<
AnonJr
17 September 2005, 14:48
Its the ' in the WHERE part of the statement. I had to remove a few of those... If the datatype is numerical, you can't have the ' around it. You'll need to fix that in a few other SQL statements.<
ElPazzo
17 September 2005, 15:14
changed the string to this:
strSQL = "SELECT TOP 1 F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID & " "
but still get the same error<
AnonJr
17 September 2005, 15:40
Drop the trailing space too. It should look like:
strSQL = "SELECT TOP 1 F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID
(I tell ya, I have definatly gotten better with my SQL working with these forums... )<
ElPazzo
17 September 2005, 15:54
what do you mean by trailing space?
inserting your string instead of mine does not work, it tells me the string is incomplete<
AnonJr
17 September 2005, 22:02
In:
strSQL = "SELECT TOP 1 F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID & " " the part in red is the trailing space.
What is the exact error?<
muzishun
17 September 2005, 22:53
Try ending the SQL statement with a semicolon. With or without the trailing space, the statment isn't completed until it's terminated. Try this:
strSQL = "SELECT TOP 1 F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID & ";"<
sr_erick
17 September 2005, 23:18
If you are using MySQL you must use LIMIT instead of TOP.
strSQL = "SELECT F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = " & strRqForumID & " LIMIT 1;"
Hopefully you get it working without running into too many more problems.<
AnonJr
17 September 2005, 23:55
Originally posted by sr_erick If you are using MySQL you must use LIMIT instead of TOP.
Ah ha! Drat that Microsoft! I'll have to file this.<
sr_erick
18 September 2005, 00:41
Originally posted by AnonJr
Ah ha! Drat that Microsoft! I'll have to file this.
No, it's just a real DBMS. <
ElPazzo
18 September 2005, 05:25
it was the mysql prob...
but how do i add a subforum now?<
Podge
18 September 2005, 05:40
Create a forum as you would normally including name, description, etc.
After it is created set the F_PARENT to the FORUM_ID of the forum you want to be its parent.<
ElPazzo
18 September 2005, 06:10
thx <
sr_erick
18 September 2005, 11:10
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.<
ElPazzo
19 September 2005, 05:29
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<
AnonJr
19 September 2005, 08:52
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 <
Shaggy
19 September 2005, 09:02
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.
<
ElPazzo
19 September 2005, 09:46
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<
ElPazzo
19 September 2005, 09:50
what would the topsql string look like?
<
Shaggy
19 September 2005, 09:51
Place it after line 647 as that's the line that's causing the error.
<
ElPazzo
19 September 2005, 10:09
there it says this:
SELECT F_PARENT FROM FORUM_FORUM WHERE FORUM_ID = LIMIT 1
seems you were right with the value<
ElPazzo
20 September 2005, 09:42
how can i get rid of that problem mentionned above?<
AnonJr
20 September 2005, 11:33
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.<