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/Code)
 help access to MySQL - bookmark.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Massimo
Junior Member

Italy
125 Posts

Posted - 15 May 2003 :  03:56:54  Show Profile  Visit Massimo's Homepage
hi to all...
I have a problem from a few we are passed from the database access to MySQL

all ok
the only evident problem is the bookmark.asp that returns this error to me:
-----------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'

[TCX][MyODBC]You have an error in your SQL syntax near '(FORUM_MEMBERS AS M ON M.MEMBER_ID = T.T_AUTHOR) INNER JOIN (FORUM_BOOKMARKS AS ' at line 1

/forum/bookmark.asp, line 166
-----------------------------------------------


but I would not know how to correct...

this is the original code:

============================================
http://www.superdeejay.net/temp/bookmark.zip
============================================

Thanks for that she/he will know how to help me...
you excuse for my English

Massimo Farieri
Snitz Italian Community
===============
http://www.snitz.it
http://www.superdeejay.net/forum/

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 15 May 2003 :  10:00:39  Show Profile
have you asked the original writer of the MOD to make the code MySQL compatible?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Massimo
Junior Member

Italy
125 Posts

Posted - 15 May 2003 :  10:08:20  Show Profile  Visit Massimo's Homepage
I have used the mods only and enough...
in access it worked

Massimo Farieri
Snitz Italian Community
===============
http://www.snitz.it
http://www.superdeejay.net/forum/

Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 15 May 2003 :  10:12:45  Show Profile
you didn't answer my question

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

Massimo
Junior Member

Italy
125 Posts

Posted - 15 May 2003 :  11:57:28  Show Profile  Visit Massimo's Homepage
have you asked the original writer of the MOD to make the code MySQL compatible?

no! :(

Massimo Farieri
Snitz Italian Community
===============
http://www.snitz.it
http://www.superdeejay.net/forum/

Go to Top of Page

Francodepaw
Junior Member

USA
111 Posts

Posted - 02 June 2003 :  23:38:28  Show Profile
Your Bookmark mod looks kind of strange to me...what version you using? Also what flavor of MySql The code in yours was to get around the inner join issue of the past, MySql 4 solves that issue and you could change the following.

Lines 156-169 Comment or Delete (back the file first)

        if strDBType = "mysql" then
	  strSql = "SELECT B.BOOKMARK_ID, C.CAT_NAME, F.F_SUBJECT, T.TOPIC_ID, T.T_SUBJECT, T.T_REPLIES, T.T_DATE, T.T_LAST_POST, M.M_NAME, T.FORUM_ID, T.CAT_ID, T.T_LAST_POST_AUTHOR, B.B_TOPICID, M.MEMBER_ID, T.T_AUTHOR, F.FORUM_ID, C.CAT_ID, F.CAT_ID FROM ("& strTablePrefix & "CATEGORY AS C INNER JOIN "& strTablePrefix & "FORUM AS F ON C.CAT_ID = F.CAT_ID) INNER JOIN ("& strMemberTablePrefix & "MEMBERS AS M ON M.MEMBER_ID = T.T_AUTHOR) INNER JOIN ("& strTablePrefix & "BOOKMARKS AS B ON B.B_TOPICID = T.TOPIC_ID) INNER JOIN "& strTablePrefix & "TOPICS AS T ON F.FORUM_ID = T.FORUM_ID WHERE (B.B_MEMBERID=" & getmemberID(strDBNTUserName) & ")"
	else
	  strSql = "SELECT B.BOOKMARK_ID, C.CAT_NAME, F.F_SUBJECT, T.TOPIC_ID, T.T_SUBJECT, T.T_REPLIES, T.T_DATE, T.T_LAST_POST, M.M_NAME, T.FORUM_ID, T.CAT_ID, T.T_LAST_POST_AUTHOR, B.B_TOPICID, M.MEMBER_ID, T.T_AUTHOR, F.FORUM_ID, C.CAT_ID, F.CAT_ID FROM ("& strTablePrefix & "CATEGORY C INNER JOIN "& strTablePrefix & "FORUM F ON C.CAT_ID = F.CAT_ID) INNER JOIN ("& strMemberTablePrefix & "MEMBERS M INNER JOIN ("& strTablePrefix & "BOOKMARKS B INNER JOIN "& strTablePrefix & "TOPICS T ON B.B_TOPICID = T.TOPIC_ID) ON M.MEMBER_ID = T.T_AUTHOR) ON F.FORUM_ID = T.FORUM_ID WHERE (B.B_MEMBERID=" & getmemberID(strDBNTUserName) & ")"
	end if

	if lastDate <> "All" then strsql = strsql & " AND T.T_LAST_POST > '" & lastDate & "'"


	if strDBType = "mysql" then
	  rs.Open strSQL, my_Conn
	Else
	  rs.Open strSQL, my_Conn, 3
    End If



Should look like this:

	strSql = "SELECT B.Bookmark_ID, C.Cat_Name, F.F_SUBJECT, T.Topic_ID, T.T_subject, T.T_Replies, T.T_date, T.T_Last_Post, M.M_NAME,T.FORUM_ID, T.CAT_ID, T.T_LAST_POST_AUTHOR FROM ("& strTablePrefix & "Category C INNER JOIN "& strTablePrefix & "Forum F ON C.Cat_ID = F.CAT_ID) INNER JOIN ("& strMemberTablePrefix & "Members M INNER JOIN ("& strTablePrefix & "Bookmarks B INNER JOIN "& strTablePrefix & "Topics T ON B.B_TopicID = T.Topic_ID) ON M.Member_id = T.T_AUTHOR) ON F.Forum_ID = T.Forum_id WHERE (B.B_MemberID=" & getmemberID(strDBNTUserName) & ")"
	if lastDate <> "All" then strsql = strsql & " AND T.T_LAST_POST > '" & lastDate & "'"
	rs.Open strSQL, my_Conn, 3


The only MySql code you should have is for paging around line 263

If strDBType <> "mysql" then
			rs.AbsolutePage = iPage
		End if


Other than that it works ok on MySql.
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.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07