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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Site Statitistics
 New Topic  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Lococoin
Starting Member

38 Posts

Posted - 15 August 2003 :  02:24:59  Show Profile
im getting this error where it should show last 25 members seen

ADODB.Recordset.1 error '80004005'

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near '25 member_id, m_name, m_lastheredate FROM FORUM_MEMBERS ORDER BY M_LASTHEREDATE ' at line 1


/forums/member_stats.asp, line 253

any ideas?
Go to Top of Page

gelliott
Junior Member

USA
268 Posts

Posted - 15 August 2003 :  08:09:53  Show Profile
check your code in that file around line 253, look for the following lines:
function DisplayLastSeen()
	dim rs
	set rs = Server.CreateObject("ADODB.Recordset")
	
	strSql = "SELECT TOP " & intLastSeen & " MEMBER_ID, M_NAME, M_LASTHEREDATE FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_LASTHEREDATE DESC"
Do they match exactly?

* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.
Go to Top of Page

Lococoin
Starting Member

38 Posts

Posted - 15 August 2003 :  23:00:51  Show Profile
ya they match, i even tried copying yours in there just to try. still the same error

here is the link to the error.

http://www.insane-asylum.ca/forums/member_stats.asp
Go to Top of Page

gelliott
Junior Member

USA
268 Posts

Posted - 18 August 2003 :  12:43:12  Show Profile
This MOD uses existing tables and fields from the 3.4.03 version of the forum, which is what you appear to have installed - thus, the file should work on the spot the moment it is copied (no changes necessary).

Try using a fresh copy of the member_stats.asp file, and if that doesn't work post a link to a text copy of your member_stats.asp file.

* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.
Go to Top of Page

HolyOutlaw
Starting Member

USA
41 Posts

Posted - 21 August 2003 :  22:56:53  Show Profile  Visit HolyOutlaw's Homepage
I am experiencing the exact same error as Lococoin.. any word on the fix?
Go to Top of Page

gelliott
Junior Member

USA
268 Posts

Posted - 23 August 2003 :  20:26:14  Show Profile
The fix is in my above post - if you have a functioning version of Snitz 3.4.03, a fresh download will work. There are no code changes to make, nothing to error out.

Try using a fresh copy of the member_stats.asp file, and if that doesn't work post a link to a text copy of your member_stats.asp file.

* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized.
Go to Top of Page

HolyOutlaw
Starting Member

USA
41 Posts

Posted - 23 August 2003 :  21:50:13  Show Profile  Visit HolyOutlaw's Homepage
well, I am using the members_stat.asp file straight from your zip file... so nothing to really post...
Go to Top of Page

geminione
Starting Member

39 Posts

Posted - 25 August 2003 :  00:34:24  Show Profile  Visit geminione's Homepage
i've achived the same error... for the "25 members Last Seen" portion
quote:

Microsoft OLE DB Provider for ODBC Drivers error '80040e09'

[TCX][MyODBC]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 '25 member_id, m_name, m_lastheredate FROM FORUM_MEMBERS ORDER B

/member_stats.asp, line 262

Go to Top of Page

wrc1
Starting Member

47 Posts

Posted - 28 August 2003 :  02:44:39  Show Profile
that's my error :

ADODB.Recordset.1 error '80004005'

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near '25 member_id, m_name, m_lastheredate FROM FORUM_MEMBERS ORDER BY M_LASTHEREDATE ' at line 1


/forum/member_stats.asp, line 253
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 28 August 2003 :  03:44:46  Show Profile
For those of you using MySQL, the SELECT TOP command doesn't work with MySQL. Only Access or MS SQL databases.

Change this line in your file:
strSql = "SELECT TOP " & intLastSeen & " MEMBER_ID, M_NAME, M_LASTHEREDATE FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_LASTHEREDATE DESC"
to this:
if strDBType = "mysql" then
    strSql = "SELECT MEMBER_ID, M_NAME, M_LASTHEREDATE FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_LASTHEREDATE DESC LIMIT " & intLastSeen
else
    strSql = "SELECT TOP " & intLastSeen & " MEMBER_ID, M_NAME, M_LASTHEREDATE FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_LASTHEREDATE DESC"
end if
The red text is what I have added to the code. This will work for both access databases and mysql databases.

Support Snitz Forums
Go to Top of Page

wrc1
Starting Member

47 Posts

Posted - 28 August 2003 :  04:20:51  Show Profile
thx.

but i get this error after i changed the code :

top 25 posters :

ADODB.Recordset.1 error '80004005'

SQLState: 42000
Native Error Code: 1064
[TCX][MyODBC]You have an error in your SQL syntax near '25 member_id, m_name, m_posts FROM FORUM_MEMBERS ORDER BY M_posts DESC' at line 1


/forum/member_stats.asp, line 338
Go to Top of Page

wrc1
Starting Member

47 Posts

Posted - 28 August 2003 :  05:50:53  Show Profile
first i get the error for 25 members last seen. I changed my code and there is no problem any more for 25 members last seen. But now there is a problem with Top 25 posters. Could someone help me with the code to change that. I think there will be also a problem with "Top 25 replied to topics" and for "top 25 read topics" If someone could help me ? or if you can post the changed file.

thx
Go to Top of Page

ErEf
New Member

Netherlands
74 Posts

Posted - 28 August 2003 :  06:59:30  Show Profile  Visit ErEf's Homepage
the site statistics are also showing stats from hidden forums :(

If you think you can or you think you cannot, you are right. - Henry Ford
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 28 August 2003 :  12:35:08  Show Profile
Any SQL code in the file that looks like this:
"SELECT TOP " & intLastSeen & " MEMBER_ID ...


You need to remove the TOP " & intLastSeen & " and just have:
SELECT MEMBER_ID ...


Then at the end of the SQL query you will put the command LIMIT along with with variable intLastSeen. The variable name might change with each sql query. So your query should look like this:
SELECT MEMBER_ID ... ORDER BY M_LASTHEREDATE DESC LIMIT " & intLastSeen


Recap: So you remove the TOP command from the query. Remove the variable that was after the TOP command and move it to the end and put in the LIMIT command, just as I showed you above, as an example.

The errors you are getting is mysql complaining that it doesn't understand the TOP command.

Support Snitz Forums
Go to Top of Page

wrc1
Starting Member

47 Posts

Posted - 29 August 2003 :  08:04:03  Show Profile
if you have the same problem if i had, here is the solution :

find :
strSql = "SELECT TOP " & intLastSeen & " MEMBER_ID, M_NAME, M_LASTHEREDATE FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_LASTHEREDATE DESC"

replace with :
if strDBType = "mysql" then
strSql = "SELECT MEMBER_ID, M_NAME, M_LASTHEREDATE FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_LASTHEREDATE DESC LIMIT " & intLastSeen
else
strSql = "SELECT TOP " & intLastSeen & " MEMBER_ID, M_NAME, M_LASTHEREDATE FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_LASTHEREDATE DESC"
end if

find :
strSql = "SELECT TOP " & intTopPosters & " MEMBER_ID, M_NAME, m_posts FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_posts DESC"

replace with:
if strDBType = "mysql" then
strSql = "SELECT MEMBER_ID, M_NAME, m_posts FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_posts DESC LIMIT " & intLastSeen
else
strSql = "SELECT TOP " & intTopPosters & " MEMBER_ID, M_NAME, m_posts FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_posts DESC"
end if

find :
strSql = "SELECT TOP " & intRepliedTopics & " TOPIC_ID, T_SUBJECT, T_REPLIES,FORUM_ID FROM " & strTablePrefix & "TOPICS ORDER BY T_REPLIES DESC"

replace with :
if strDBType = "mysql" then
strSql = "SELECT TOPIC_ID, T_SUBJECT, T_REPLIES,FORUM_ID FROM " & strTablePrefix & "TOPICS ORDER BY T_REPLIES DESC LIMIT " & intLastSeen
else
strSql = "SELECT TOP " & intRepliedTopics & " TOPIC_ID, T_SUBJECT, T_REPLIES,FORUM_ID FROM " & strTablePrefix & "TOPICS ORDER BY T_REPLIES DESC"
end if


find :
strSql = "SELECT TOP " & intReadTopics & " TOPIC_ID, T_SUBJECT, T_VIEW_COUNT,forum_id FROM " & strTablePrefix & "TOPICS ORDER BY T_VIEW_COUNT DESC"

replace with :
if strDBType = "mysql" then
strSql = "SELECT TOPIC_ID, T_SUBJECT, T_VIEW_COUNT,forum_id FROM " & strTablePrefix & "TOPICS ORDER BY T_VIEW_COUNT DESC LIMIT " & intLastSeen
else
strSql = "SELECT TOP " & intReadTopics & " TOPIC_ID, T_SUBJECT, T_VIEW_COUNT,forum_id FROM " & strTablePrefix & "TOPICS ORDER BY T_VIEW_COUNT DESC"
end if
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous 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.43 seconds. Powered By: Snitz Forums 2000 Version 3.4.07