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
 SQL syntax error in private messages
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

geminione
Starting Member

39 Posts

Posted - 26 August 2003 :  15:39:40  Show Profile  Visit geminione's Homepage
I've ran across a similiar error on a few other pages... but was able to make the change from SELECT TOP to LIMIT and that made these pages mySQL compatible. Unfortunately... i cannot locate TOP on this page. Nor have i had any luck searching for a solution here. I can send PM's no problem, read sent pm's, and view my inbox A-OK... only when it comes to actually reading a specific PM... i error out.

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

[TCX][MyODBC]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 Count(M_TO) FROM FORUM_MEMBERS M, FORUM_PM P WHERE M.M_N

/privateread.asp, line 119


quote:

if strDBType = "access" then ' Get Private Message Total for Display(Access)
strSqL = "SELECT count(M_TO) as [pmtotal1] FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "PM P WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_TO "
Set rsPM1 = my_Conn.Execute(strSql)

strSqL = "SELECT count(M_FROM) as [pmtotal2] FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "PM P WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_FROM "
Set rsPM2 = my_Conn.Execute(strSql)

pmtotal1 = rsPM1("pmtotal1")
pmtotal2 = rsPM2("pmtotal2")

rsPM1.close
set rsPM1 = nothing
rsPM2.close
set rsPM2 = nothing


else
' Get Private Message Total for display(SQL, mySQL)
strSql = "SELECT pmtotal1=(SELECT Count(M_TO) FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "PM P WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_TO), pmtotal2=(SELECT Count(M_FROM) FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "PM P WHERE M.M_NAME = '" & strDBNTUserName & "' AND M.MEMBER_ID = P.M_FROM)"

Set rsPM = my_Conn.Execute(strSql) <---LINE 119
pmtotal1 = rsPM("pmtotal1")
pmtotal2 = rsPM("pmtotal2")

rsPM.close
set rsPM = nothing

end if



http://forum.miscellaneousdebris.com/privateread.txt

Edited by - Davio on 27 August 2003 07:18:00
  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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07