select R_REPLY on forum.asp? - نوشته شده در (2215 Views)
Senior Member
MaD2ko0l
مطلب: 1053
1053
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<
© 1999-2010 MaD2ko0l
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
what is R_REPLY ?<
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
DOH!
i mean R_AUTHOR from the REPLY table<
© 1999-2010 MaD2ko0l
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
ok, why do you want/need this in forum.asp ? forum.asp does not have any replies only topics.<
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
© 1999-2010 MaD2ko0l
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
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.<
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
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<
© 1999-2010 MaD2ko0l
نوشته شده در
Average Member
cripto9t
مطلب: 881
881
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.
<
    _-/Cripto9t\-_
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
yes please...it may help me out.
greatly apreciated<
© 1999-2010 MaD2ko0l
نوشته شده در
Average Member
cripto9t
مطلب: 881
881
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 smile.<
    _-/Cripto9t\-_
نوشته شده در
Senior Member
MaD2ko0l
مطلب: 1053
1053
yes i get a

Syntax error in JOIN operation

:-(<
© 1999-2010 MaD2ko0l
شما باید یک متن وارد کنید