MySQL: Search error
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=17858
Printed Date: 13 April 2026 at 5:59pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: MySQL: Search error
Posted By: Mikey
Subject: MySQL: Search error
Date Posted: 11 January 2006 at 11:03pm
MySQL version, Logged in as admin, On submital of search for the term 'Test' (a term i know is in my test posts) searching all forums using 'Match all words'...
Error wrote:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51
Driver][mysqld-4.0.21-debug]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 'SELECT tblPermissions.Forum_ID FROM tblPermissions
WHERE (tblP
/wwwv8_test/search_process.asp, line 610 |

------------- Handyman man?
|
Replies:
Posted By: WebWiz-Bruce
Date Posted: 12 January 2006 at 11:12am
Thanks again, another one to look into.
I did do quite a bit of testing with the mySQL version, but not as much as I would have liked to.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: Mikey
Date Posted: 12 January 2006 at 11:30am
Thats why we're here dude, not like there's much else i can do in this freezing London weather lol
------------- Handyman man?
|
Posted By: WebWiz-Bruce
Date Posted: 12 January 2006 at 12:08pm
I thought it was quite mild today, although I am about 100 miles from London.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: Mikey
Date Posted: 12 January 2006 at 1:03pm
To be honest with you i'm sitting next to a radiator and just looking out the window, the people do look cold outside in their scarfs and gloves so i don't think i risk going outside just yet, Altho unfortunatley i work outside so got no choice really
------------- Handyman man?
|
Posted By: WebWiz-Bruce
Date Posted: 12 January 2006 at 1:44pm
Thats better than me, I have an office with no working lights and only 1 working plug, that I'm running everything from, including, heater, stereo, PC, monitor, printer, phones, router, etc.
I know when it's a could day, I have to keep my coat on even with the heater on full, I usually give up and go home when my fingers get so cold and numb, I can no-longer feel the keys on teh keyboard.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: Mikey
Date Posted: 12 January 2006 at 2:36pm
Yeah that brings back memories  I shall be purchasing a link/Ad removal key in the next few months, so maybe a little more heating for ya lol 
------------- Handyman man?
|
Posted By: conxion
Date Posted: 12 January 2006 at 2:57pm
|
Talking about weather, I'm so lucky that living in a tropic country line mine. My colleagues from UK also enjoy staying here in the warm weather with beautiful sunshine. Have you ever thought about living and working in an SouthEastAsia country?
|
Posted By: longcong
Date Posted: 12 January 2006 at 5:26pm
find: 'Put in where cluases for the actual search strSQL = strSQL & _ strSQLwhereDate & _ strSQLwhereForum & _ strSQLwhereMemSearch & _ strSQLwhereKeywords 'Check the permissions strSQL = strSQL & _ "AND (" & strDbTable & "Topic.Forum_ID " & _ "IN (" & _ "SELECT " & strDbTable & "Permissions.Forum_ID " & _ "FROM " & strDbTable & "Permissions " & strDBNoLock & " " & _ "WHERE (" & strDbTable & "Permissions.Group_ID = " & intGroupID & " OR " & strDbTable & "Permissions.Author_ID = " & lngLoggedInUserID & ") " & _ "AND " & strDbTable & "Permissions.View_Forum=" & strDBTrue & _ ")" & _ ") "
re:
'Put in where cluases for the actual search strSQL = strSQL & _ strSQLwhereDate & _ strSQLwhereForum & _ strSQLwhereMemSearch & _ strSQLwhereKeywords 'Check the permissions strSQL = strSQL & _ "AND (" & strDbTable & "Topic.Forum_ID " & _ "IN ('" & _ "SELECT " & strDbTable & "Permissions.Forum_ID " & _ "FROM " & strDbTable & "Permissions " & strDBNoLock & " " & _ "WHERE (" & strDbTable & "Permissions.Group_ID = " & intGroupID & " OR " & strDbTable & "Permissions.Author_ID = " & lngLoggedInUserID & ") " & _ "AND " & strDbTable & "Permissions.View_Forum=" & strDBTrue & _ "')" & _ ") "
|
Posted By: WebWiz-Bruce
Date Posted: 17 January 2006 at 12:49pm
The above wouldn't work as a solution as it means that sub query (not support in mySQL 4.0) would not run, thus the page would never display a result.
What you need to do is use mySQL 4.1 or above which does support sub queries.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
|