Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 select R_REPLY on forum.asp?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
MaD2ko0l Posted - 06 August 2007 : 13:54:57
hiya,
as the title says, i want to select R_REPLY from the Reply table. and i dont know how to incorporate it into the current select statement where it is selecting the topics.

can anyone help me?

thansk

MaD2ko0l<
15   L A T E S T    R E P L I E S    (Newest First)
MaD2ko0l Posted - 05 June 2008 : 14:46:17
hi,
i think i did it. i did what Huwr said to do.

so can someone check over it and make sure everyhting looks ok for me?

here the link Click Me

thanks

MaD2ko0l<
MaD2ko0l Posted - 13 August 2007 : 15:41:40
i tryed this

strSql6 = " FROM FORUM_MEMBERS M, (FORUM_TOPICS T INNER JOIN FORUM_REPLY R ON( T.TOPIC_ID = R.TOPIC_ID AND R.R_AUTHOR =" & MemberID & ")) , FORUM_MEMBERS AS MEMBERS_1"


it was straight out of access and now i get this error

You tried to execute a query that does not include the specified expression 'T_STATUS' as part of an aggregate function<
cripto9t Posted - 12 August 2007 : 17:12:50
Nope that doesn't work either. I was able to log on to my free site with an access db and try a few things before I got kicked off. No luck . Hopefully someone will spot what I've done wrong.<
cripto9t Posted - 12 August 2007 : 10:30:41
After a ton of searches, someone finally came up with a decient simple answer that I could understand .
quote:
The JetSQL syntax is:
FROM ((table1
INNER JOIN table2 ON ....)
INNER JOIN table3 ON ....)
INNER JOIN table4 ON ...


Going with that syntax try replacing strSql6 with this
strSql6 = " FROM ((" & strMemberTablePrefix & "MEMBERS M, "
strSql6 = strSql6 & strActivePrefix & "TOPICS T), " 
strSql6 = strSql6 & strMemberTablePrefix & "MEMBERS AS MEMBERS_1) "
strSql6 = strSql6 & "LEFT JOIN " & strActivePrefix & "REPLY R "
strSql6 = strSql6 & "ON T.TOPIC_ID = R.TOPIC_ID AND R.R_AUTHOR = " & MemberID

I hope this works. It will end an access mystery for me.<
MaD2ko0l Posted - 11 August 2007 : 17:09:00
hiya,

im using an access db
and this is the output i get

SELECT T.T_STATUS, T.CAT_ID, T.FORUM_ID, T.TOPIC_ID, T.T_VIEW_COUNT, T.T_SUBJECT, T.T_MESSAGE, T.T_AUTHOR, T.T_STICKY, T.T_REPLIES, T.T_UREPLIES, T.T_LAST_POST, T.T_LAST_POST_AUTHOR, T.T_LAST_POST_REPLY_ID, M.M_NAME, MEMBERS_1.M_NAME AS LAST_POST_AUTHOR_NAME FROM ((FORUM_MEMBERS M, FORUM_TOPICS T, FORUM_MEMBERS AS MEMBERS_1) LEFT JOIN FORUM_REPLY R ON (T.TOPIC_ID = R.TOPIC_ID AND R.R_AUTHOR = 1)) WHERE M.MEMBER_ID = T.T_AUTHOR AND T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID AND T.FORUM_ID = 1 AND T.T_LAST_POST > '20070712220933' GROUP BY T.TOPIC_ID HAVING COUNT(R.R_AUTHOR) > -1 ORDER BY T.T_LAST_POST DESC
Microsoft JET Database Engine error '80040e14'

Syntax error in JOIN operation.

/na/snitzprivate/forum.asp, line 354
<
cripto9t Posted - 11 August 2007 : 14:32:25
That's what I was afraid of :(. What db type are you using?
If you could put these lines
Response.Write strSql & strSql6 & strSql3 & strSql7 & strSql4
Response.End

right before this line in forum.asp
if strDBType = "mysql" then 'MySql specific code

And post the results. Maybe someone with your db type experience could help.

When I upgraded my MySql db I had the same issue. Rearranging the parenthesis fixed it. I think that's the problem here.<
MaD2ko0l Posted - 11 August 2007 : 13:47:00
yes i get a

Syntax error in JOIN operation

:-(<
cripto9t Posted - 11 August 2007 : 12:15:46
I think I got everything.
Right click and Save.
If you are using any db other than MySql5 you may recieve an error, but maybe one of the local db gurus can help .<
MaD2ko0l Posted - 10 August 2007 : 13:50:59
yes please...it may help me out.

greatly apreciated<
cripto9t Posted - 10 August 2007 : 09:51:36
I got this to work by counting the replies in the topic sql.
I can only test with a mySql db and from experiece with some of my other mods I doubt it will work with access.
If you want I'll get the files together for you.

<
MaD2ko0l Posted - 06 August 2007 : 16:26:59
hiya,
i know forum.asp tells u if u r the author, but what i am trying to do is to get forum.asp to tell me if i have posted a reply in a topic.

will try the code in a bit<
HuwR Posted - 06 August 2007 : 16:16:31
I'm not sure I agree with your thinking, for a start forum.asp already tells you if you are the author, your name is listed as the author, but hey, if you want to slow your forum down who am I to stop you.

I would write a function to which you pass the member_id and the forum_id and the topic_id and return true/false if you post in it, in the function you need a simple query like below (not tested obviously)

SELECT REPLY_ID FROM FORUM_REPLY WHERE FORUM_ID=ForumId AND TOPIC_ID=TopicId AND R_AUTHOR=MemberId

ForumId,TopicId and MemberId are the values you passed to the function, if the query returns any results then you made a post in that topic.<
MaD2ko0l Posted - 06 August 2007 : 15:46:38
HuwR Posted - 06 August 2007 : 15:11:12
ok, why do you want/need this in forum.asp ? forum.asp does not have any replies only topics.<
MaD2ko0l Posted - 06 August 2007 : 14:38:52
DOH!

i mean R_AUTHOR from the REPLY table<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07