Print Page | Close Window

MySQL problem with latest topics 1.02

Printed From: S2H.co.uk
Category: Web Wiz Forums
Forum Name: Modifications Support
Forum Description: Support for modifications and add-ons for Web Wiz Forums from S2H.
URL: http://www.s2h.co.uk/forum/forum_posts.asp?TID=131
Printed Date: 27 Mar 2026 at 2:08am


Topic: MySQL problem with latest topics 1.02
Posted By: claust
Subject: MySQL problem with latest topics 1.02
Date 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??




Replies:
Posted By: Matt
Date 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.


Posted By: claust
Date Posted: 05 Dec 2008 at 2:11pm
Thanks a lot, much appreciated :-) Thumbs%20Up


Posted By: claust
Date 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 :-)


Posted By: Matt
Date Posted: 13 Dec 2008 at 3:28pm
I have now updated the ../wwf/mods/latest-topics/" rel="no follow - Latest Topics to add support for MySQL Database.



Print Page | Close Window