MySQL problem with latest topics 1.02 |
Post Reply |
Author | |
claust
Newbie Joined: 04 Dec 2008 Status: Offline Points: 3 |
Post Options
Quote Reply
Topic: MySQL problem with latest topics 1.02 Posted: 04 Dec 2008 at 3:50pm |
Hi,
I am getting this error; Microsoft OLE DB Provider for ODBC Drivers error '80040e14' [MySQL][ODBC 3.51 Driver][mysqld-5.0.67]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 '10 tblForum.Forum_ID, tblForum.Forum_name, tblTopic.Topic_ID, tblTopic.Subject, ' at line 1 /forum/includes/s2h_latest-topics.asp, line 59 ---- The SQL prints out; SELECT TOP 10 tblForum.Forum_ID, tblForum.Forum_name, tblTopic.Topic_ID, tblTopic.Subject, tblThread.Thread_ID, tblThread.Message_date, tblAuthor.Author_ID, tblAuthor.Username, tblThread.Message FROM tblForum, tblTopic, tblAuthor, tblThread WHERE tblForum.Forum_ID = tblTopic.Forum_ID AND tblTopic.Last_Thread_ID = tblThread.Thread_ID AND tblAuthor.Author_ID = tblThread.Author_ID AND (tblTopic.Forum_ID IN (SELECT tblPermissions.Forum_ID FROM tblPermissions WHERE (tblPermissions.Group_ID = 2) AND tblPermissions.View_Forum = -1))AND (tblForum.Password = '' OR tblForum.Password Is Null) AND (tblTopic.Hide = 0 AND tblThread.Hide = 0) ORDER BY tblThread.Thread_ID DESC ------ I tried editing the SQL to 'select * ....' and 'limit 0,10' but no luck, is this mod for MSSQL only, or am I doing something wrong?? |
|
Matt
Admin Group Joined: 07 Feb 2003 Location: Manchester, UK Status: Offline Points: 195 |
Post Options Quote Reply Posted: 05 Dec 2008 at 7:11am |
Unfortunately, I do not run any forums under MySQL so I don't have want to test it under - so yes my mods do get made for MSSQL mostly.
I will setup a temporary MySQL test forum and make it MySQL compatible. Edited by Scotty32 - 05 Dec 2008 at 7:12am |
|
claust
Newbie Joined: 04 Dec 2008 Status: Offline Points: 3 |
Post Options Quote Reply Posted: 05 Dec 2008 at 2:11pm |
Thanks a lot, much appreciated :-)
|
|
claust
Newbie Joined: 04 Dec 2008 Status: Offline Points: 3 |
Post Options Quote Reply Posted: 06 Dec 2008 at 10:13am |
Solved it, the SQL statement for MySQL should read ;
SELECT tblForum.Forum_ID, tblForum.Forum_name, tblTopic.Topic_ID, tblTopic.Subject, tblThread.Thread_ID, tblThread.Message_date, tblAuthor.Author_ID, tblAuthor.Username, tblThread.Message FROM tblForum, tblTopic, tblAuthor, tblThread WHERE tblForum.Forum_ID = tblTopic.Forum_ID AND tblTopic.Last_Thread_ID = tblThread.Thread_ID AND tblAuthor.Author_ID = tblThread.Author_ID AND (tblTopic.Forum_ID IN (SELECT tblPermissions.Forum_ID FROM tblPermissions WHERE (tblPermissions.Group_ID = 2) AND tblPermissions.View_Forum = -1))AND (tblForum.Password = '' OR tblForum.Password Is Null) AND (tblTopic.Hide = 0 AND tblThread.Hide = 0) ORDER BY tblThread.Thread_ID DESC limit 0,10 This works :-) |
|
Matt
Admin Group Joined: 07 Feb 2003 Location: Manchester, UK Status: Offline Points: 195 |
Post Options Quote Reply Posted: 13 Dec 2008 at 3:28pm |
I have now updated the Latest Topics to add support for MySQL Database.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.078 seconds.