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/O Code)
 Member RSS...what am I doing wrong?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ILLHILL
Junior Member

Netherlands
341 Posts

Posted - 18 March 2006 :  20:28:58  Show Profile  Reply with Quote
Im trying to add an RSS link to my members personal pages,
displaying their latest blogs/updates in rss.
I wrote a script and named it PageRSS.asp and have it linked like:
http://my.illhill.com/PageRSS.asp?id=XXXX

Here's the error I get:

Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'M.M_MEMBER_ID = & ppMember_ID'.
/my/PageRSS.asp, line 30


Here's the code:

<rss version="2.0">
<!--
This web page is a data file that is meant to be read by RSS readers.
To read these posts in an user-friendly layout visit http://my.illhill.com
-->
<channel>
<title>Blogs/Updates RSS Feed Sorted By Member</title>
<description>Blogs/Updates RSS Feed Sorted By Member</description>
<link>http://my.illhill.com</link>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<%
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

dim intResults,Topic_ID,strSubject,Topic_Replies,Topic_Last_Post_Reply_ID,Forum_Subject,LastReplyMsg
'disable images
strIcons = "0"
strIMGInPosts = "0"
if Request.QueryString("id") <> "" and IsNumeric(Request.QueryString("id")) = true then
ppMember_ID = cLng(Request.QueryString("id"))
else
ppMember_ID = 0
end if
strSql = "SELECT TOP 5 T.TOPIC_ID, T.T_SUBJECT, M.M_NAME, M.MEMBER_ID, T.T_DATE, T.T_SUBJECT, T.T_MESSAGE, T.T_AUTHOR, T.FORUM_ID "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "TOPICS T"
strSql = strSql & " WHERE M.M_MEMBER_ID = & ppMember_ID "
strSql = strSql & " ORDER BY T.TOPIC_ID DESC"
set rs = my_Conn.Execute(strSql)
if currTopic <> rs("TOPIC_ID") then
currTopic = 0
TopicCount = 0
do until rs.EOF or (TopicCount = 5)
if currTopic <> rs("TOPIC_ID") then
Response.Write "<item>" & vbNewline
Response.Write "<title>" & rs("T_SUBJECT") & "</title>" & vbNewline
Response.Write "<description>" & rs("T_MESSAGE") & "</description>" & vbNewline
Response.Write "<link>http://www.illhill.com/" & rs("M_NAME") & "#" & rs("TOPIC_ID") & "</link>" & vbNewline
Response.Write "</item>" & vbNewline
TopicCount = TopicCount + 1
end if
rs.MoveNext
loop
end if
rs.close
set rs = nothing
%>
</channel>
</rss>


Any suggestions on what I'm doing wrong?

Thanks, Dominic
<

CLPPR.com - All The News Only Seconds Away

bobby131313
Senior Member

USA
1163 Posts

Posted - 18 March 2006 :  20:49:13  Show Profile  Visit bobby131313's Homepage  Reply with Quote
quote:
set rs = my_Conn.Execute(strSql)


Mine all have a space in them before (strSql) like this...

set rs = my_Conn.Execute (strSql)

That appears to be line 30 if you don't count the blank line.

Could that be the problem?

Edited: Just noticed there is one line that wraps, so I think that is line 30.<

Switch the order of your title tags

Edited by - bobby131313 on 18 March 2006 20:54:25
Go to Top of Page

ILLHILL
Junior Member

Netherlands
341 Posts

Posted - 18 March 2006 :  22:22:54  Show Profile  Reply with Quote
Thanks for the reply.
The ppMember part was the error.

Now the strings look like:

Member_ID = cLng(Request.QueryString("MEMBER_ID"))
strSql = "SELECT TOP 5 T.TOPIC_ID, T.T_SUBJECT, T.T_DATE, T.T_SUBJECT, T.T_MESSAGE, T.T_AUTHOR, T.FORUM_ID, M.M_NAME, M.MEMBER_ID "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS T, " & strMemberTablePrefix & "MEMBERS M"
strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR "
strSql = strSql & " ORDER BY T.TOPIC_ID DESC"

However that is only displaying the latest 5 topics by any member and not by the selected member.

:(<

CLPPR.com - All The News Only Seconds Away
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 18 March 2006 :  22:46:30  Show Profile  Visit AnonJr's Homepage  Reply with Quote
Its in the WHERE clause. Off the cuff it should probably be more like:

Member_ID = cLng(Request.QueryString("MEMBER_ID"))
strSql = "SELECT TOP 5 T.TOPIC_ID, T.T_SUBJECT, T.T_DATE, T.T_SUBJECT, T.T_MESSAGE, T.T_AUTHOR, T.FORUM_ID, M.M_NAME, M.MEMBER_ID "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS T, " & strMemberTablePrefix & "MEMBERS M"
strSql = strSql & " WHERE M.MEMBER_ID = T.T_AUTHOR AND T.T_AUTHOR = " & Member_ID & " "
strSql = strSql & " ORDER BY T.TOPIC_ID DESC"

The part in red should also make sure that the author is the member ID you are passing.

Like I said at the beginning, this is near the end of the day for me and is off-the-cuff, so treat accordingly ... make a backup first. <
Go to Top of Page

ILLHILL
Junior Member

Netherlands
341 Posts

Posted - 28 March 2006 :  18:13:28  Show Profile  Reply with Quote
Hi Anon, sorry forgot to thank you.
I found a way to solve the situation and posted
the whole thing as a mini mod in the mod w code forum.

Greets & thanks, Dominic<

CLPPR.com - All The News Only Seconds Away
Go to Top of Page

fumatul
Starting Member

Afghanistan
1 Posts

Posted - 05 April 2006 :  09:04:10  Show Profile  Visit fumatul's Homepage  Reply with Quote
i got the same error, and still i can't fix it ... nervermid, i'm probably doing something wrong!

PS-Nu uitati! http://www.fumat.caini.org dauneaza grav sanatatii!<
Go to Top of Page

ILLHILL
Junior Member

Netherlands
341 Posts

Posted - 06 April 2006 :  18:28:33  Show Profile  Reply with Quote
Check this:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=61417

I got it to work, using some other code and it works.
Hope you like it.

Greets, D<

CLPPR.com - All The News Only Seconds Away
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07