Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Simple Slash Mod
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 5

acoustika
Junior Member

Denmark
311 Posts

Posted - 30 November 2003 :  09:09:08  Show Profile  Visit acoustika's Homepage
Thanks cripto9t, I remember the TopSql Andhave tried working a little with it, bud couldn't seem to find the way to write it, I'll try your way ;-)

May The Code Be With You
www.UniqueDk.dk *** The Open Forums of Denmark ***
Go to Top of Page

acoustika
Junior Member

Denmark
311 Posts

Posted - 30 November 2003 :  09:31:49  Show Profile  Visit acoustika's Homepage
I got i working with LIMIT, easier than the TopSql I think, that one I couldn't get to work :-)

Nice Script :-)

May The Code Be With You
www.UniqueDk.dk *** The Open Forums of Denmark ***
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 01 December 2003 :  08:02:53  Show Profile  Visit RebelTech's Homepage
quote:
Originally posted by acoustika

I got i working with LIMIT, easier than the TopSql I think, that one I couldn't get to work :-)

Nice Script :-)



Sorry to take so long to get back to you, I was away from the computer yesterday. I am glad you got it working. I will add cypto's fix to the mod so others won't have to re -invent the wheel. And acoustika I will add your fixvalso if you will post it.

Edited by - RebelTech on 01 December 2003 08:05:53
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 01 December 2003 :  11:33:01  Show Profile
RebelTech, it would be better if you posted a new topic in the MOD Add-On Forum (W/ Code) for your mod, instead of moving this topic.

Support Snitz Forums
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 01 December 2003 :  14:27:28  Show Profile  Visit RebelTech's Homepage
quote:
Originally posted by Davio

RebelTech, it would be better if you posted a new topic in the MOD Add-On Forum (W/ Code) for your mod, instead of moving this topic.


No problem. Will do.
Go to Top of Page

acoustika
Junior Member

Denmark
311 Posts

Posted - 01 December 2003 :  14:41:29  Show Profile  Visit acoustika's Homepage
Here is The fix I made for MySql
I added the code in RED and
removed the code in GREEN

strSql = "SELECT " & intTopicCount & " "
strSql = strSql & strTablePrefix & "TOPICS.TOPIC_ID, "
strSql = strSql & strTablePrefix & "TOPICS.T_SUBJECT, "
strSql = strSql & strTablePrefix & "TOPICS.T_MESSAGE, "
strSql = strSql & strTablePrefix & "TOPICS.T_DATE, "
strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR, "
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID, "
strSql = strSql & strTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & " FROM ((" & strTablePrefix & "FORUM "
strSql = strSql & "INNER JOIN " & strTablePrefix & "TOPICS ON "
strSql = strSql & strTablePrefix & "FORUM.FORUM_ID = "
strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID) "
strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON "
strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR = "
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID) "
If ForumID <> "ANY" Then strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.FORUM_ID = " & ForumID
strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_DATE DESC "
strSql = strSql & "LIMIT " & intTopicCount

May The Code Be With You
www.UniqueDk.dk *** The Open Forums of Denmark ***
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 01 December 2003 :  22:12:27  Show Profile  Visit RebelTech's Homepage
Thanks acoustika
I updated the readme with your fix and gave you credit for it thanks.
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 02 December 2003 :  01:47:42  Show Profile  Visit Gremlin's Homepage
Just beware that the code above now won't work with MS SQL or MS Access heh.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 02 December 2003 :  01:49:53  Show Profile  Visit Gremlin's Homepage

If strDBType = "mysql" then
  strSql = "SELECT "
Else
  strSql = "SELECT TOP " & intTopicCount & " "
End If
strSql = strSql & strTablePrefix & "TOPICS.TOPIC_ID, "
strSql = strSql & strTablePrefix & "TOPICS.T_SUBJECT, "
strSql = strSql & strTablePrefix & "TOPICS.T_MESSAGE, "
strSql = strSql & strTablePrefix & "TOPICS.T_DATE, "	
strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR, "
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID, "
strSql = strSql & strTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & " FROM ((" & strTablePrefix & "FORUM " 
strSql = strSql & "INNER JOIN " & strTablePrefix & "TOPICS ON " 
strSql = strSql & strTablePrefix & "FORUM.FORUM_ID = " 
strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID) " 
strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON "
strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR = " 
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID) "
If ForumID <> "ANY" Then strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.FORUM_ID = " & ForumID
strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_DATE DESC "
If strDBType = "mysql" then 
  strSql = strql & "LIMIT " & intTopicCount
End If

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 02 December 2003 :  02:00:44  Show Profile  Visit RebelTech's Homepage
Thanks Gremlin, zip updated. Is it ok for MS SQL?
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 02 December 2003 :  03:53:07  Show Profile  Visit Gremlin's Homepage
Yeah should work for all of them now I think, haven't tested mysql but access definately still works which means MSSQL should too :)

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 02 December 2003 :  11:11:52  Show Profile  Visit tribaliztic's Homepage
Hmm... I've read this thread and can't find the answer, I get this error:
ADODB.Connection.1 error '80004005'

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near 'LIMIT 5' at line 1


/forum/simple_slash.asp, line 46

the line is: Set objRS = objConn.Execute(strSQL)

I run Serverhackers forum, on MySQL database.

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 02 December 2003 :  12:22:10  Show Profile  Visit RebelTech's Homepage
quote:
Originally posted by tribaliztic

Hmm... I've read this thread and can't find the answer, I get this error:
ADODB.Connection.1 error '80004005'

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near 'LIMIT 5' at line 1


/forum/simple_slash.asp, line 46

the line is: Set objRS = objConn.Execute(strSQL)

I run Serverhackers forum, on MySQL database.




Download the latest .zip from ftp://ftp.spinbusters.com/simpleslash.zip and see if that don't fix it.
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 03 December 2003 :  03:01:43  Show Profile  Visit tribaliztic's Homepage
I did that yesterday, is there a new one released since? I'll try that now anyways...

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

RebelTech
Average Member

USA
613 Posts

Posted - 03 December 2003 :  03:53:06  Show Profile  Visit RebelTech's Homepage
The opening section of code was replaced with this:
If strDBType = "mysql" then
  strSql = "SELECT "
Else
  strSql = "SELECT TOP " & intTopicCount & " "
End If
strSql = strSql & strTablePrefix & "TOPICS.TOPIC_ID, "
strSql = strSql & strTablePrefix & "TOPICS.T_SUBJECT, "
strSql = strSql & strTablePrefix & "TOPICS.T_MESSAGE, "
strSql = strSql & strTablePrefix & "TOPICS.T_DATE, "    
strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR, "
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID, "
strSql = strSql & strTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & " FROM ((" & strTablePrefix & "FORUM " 
strSql = strSql & "INNER JOIN " & strTablePrefix & "TOPICS ON " 
strSql = strSql & strTablePrefix & "FORUM.FORUM_ID = " 
strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID) " 
strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON "
strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR = " 
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID) "
If ForumID <> "ANY" Then strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.FORUM_ID = " & ForumID
strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_DATE DESC "
If strDBType = "mysql" then 
  strSql = strql & "LIMIT " & intTopicCount
End If


If yours looks like that and still does not work try replacing the above with this:
strSql = "SELECT " & intTopicCount & " "
strSql = strSql & strTablePrefix & "TOPICS.TOPIC_ID, "
strSql = strSql & strTablePrefix & "TOPICS.T_SUBJECT, "
strSql = strSql & strTablePrefix & "TOPICS.T_MESSAGE, "
strSql = strSql & strTablePrefix & "TOPICS.T_DATE, " 
strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR, "
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID, "
strSql = strSql & strTablePrefix & "MEMBERS.M_NAME "
strSql = strSql & " FROM ((" & strTablePrefix & "FORUM " 
strSql = strSql & "INNER JOIN " & strTablePrefix & "TOPICS ON " 
strSql = strSql & strTablePrefix & "FORUM.FORUM_ID = " 
strSql = strSql & strTablePrefix & "TOPICS.FORUM_ID) " 
strSql = strSql & "INNER JOIN " & strTablePrefix & "MEMBERS ON "
strSql = strSql & strTablePrefix & "TOPICS.T_AUTHOR = " 
strSql = strSql & strTablePrefix & "MEMBERS.MEMBER_ID) "
If ForumID <> "ANY" Then strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.FORUM_ID = " & ForumID
strSql = strSql & " ORDER BY " & strTablePrefix & "TOPICS.T_DATE DESC "
strSql = strSql & "LIMIT " & intTopicCount
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.33 seconds. Powered By: Snitz Forums 2000 Version 3.4.07