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
 Alan statistics and MySQL
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Zeb
Starting Member

Italy
41 Posts

Posted - 06 August 2002 :  20:59:47  Show Profile
I migrated from access to MySQL (really tired)

all is working (as far I can see in 2 hours) but I can't get the Alan Stats working...

it gives me this error in the "Top 25 members last seen" table:

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

[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

/sdc/try/statistics.asp, line 240


Any help is appreciated since I cannot put online the migrated furum with this trouble...

thanks...


___
Zeb

Edited by - Zeb on 06 August 2002 21:01:02

GauravBhabu
Advanced Member

4288 Posts

Posted - 06 August 2002 :  21:41:02  Show Profile
You need to modify the following statement

strSql = "SELECT TOP " & intTopPosters & " member_id, m_name, m_country, m_posts FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_posts DESC"



Modify the above statement as below

strSql = "SELECT "
if strDBType <> "mysql" then strSql = strSql & TOP " & intTopPosters
strSql = strSql & " member_id, m_name, m_country, m_posts FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_posts DESC"
if strDBType = "mysql" then strSql = strSql & " LIMIT " & intTopPosters & ";"


www.forumSquare.com - Rakesh Jain - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Zeb
Starting Member

Italy
41 Posts

Posted - 06 August 2002 :  22:17:50  Show Profile
I already changed it in a different way and works like a charm...

here is my changes... from:

strSql = "SELECT TOP " & intTopPosters & " member_id, m_name, m_country, m_posts FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_posts DESC"

to:

strSql = "SELECT member_id, m_name, m_country, m_posts FROM " & strMemberTablePrefix & "MEMBERS ORDER BY M_posts DESC LIMIT " & intTopPosters

Do you think that's a good way?

thank you GauravBhabu ...for the fast answer too!


___
Zeb

Edited by - Zeb on 06 August 2002 22:19:10

Edited by - Zeb on 06 August 2002 22:21:52
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 06 August 2002 :  22:22:44  Show Profile
The code I have given will work with all databases. The one you have will work only with MySQL.

www.forumSquare.com - Rakesh Jain - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Zeb
Starting Member

Italy
41 Posts

Posted - 07 August 2002 :  06:26:37  Show Profile
quote:

The code I have given will work with all databases. The one you have will work only with MySQL.

www.forumSquare.com - Rakesh Jain - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.



Yes... thank you GauravBhabu !


___
Zeb
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07