Author |
Topic |
bobby131313
Senior Member
USA
1163 Posts |
Posted - 02 March 2008 : 20:12:04
|
Here's what comes up...
SELECT a.CAT_ID, a.FORUM_ID, a.TOPIC_ID, a.T_SUBJECT, a.MSG_ID, a.MSG, a.MSG_DATE, a.MEMBER_ID, a.M_NAME FROM ( SELECT t.CAT_ID, t.FORUM_ID, t.TOPIC_ID, t.T_SUBJECT, '' AS MSG_ID, t.T_MESSAGE AS MSG, t.T_DATE AS MSG_DATE, m.MEMBER_ID, m.M_NAME FROM FORUM_MEMBERS m INNER JOIN FORUM_TOPICS t ON m.MEMBER_ID = t.T_AUTHOR UNION ALL SELECT t.CAT_ID, t.FORUM_ID, t.TOPIC_ID, t.T_SUBJECT, r.REPLY_ID AS MSG_ID, r.R_MESSAGE as MSG, r.R_DATE as MSG_DATE, m.MEMBER_ID, m.M_NAME FROM (FORUM_TOPICS t INNER JOIN FORUM_REPLY r ON t.TOPIC_ID = r.TOPIC_ID) INNER JOIN FORUM_MEMBERS m ON r.R_AUTHOR = m.MEMBER_ID ) a INNER JOIN FORUM_FORUM f ON f.FORUM_ID = a.FORUM_ID WHERE f.F_PRIVATEFORUMS = 0 ORDER BY MSG_DATE DESC;
http://www.coincommunity.com/forum/test_topMessages.asp< |
Switch the order of your title tags |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 02 March 2008 : 21:05:24
|
you don't have the right version (last version is 1.3, check you file, refresh the code page - maybe you are getting a cached version), but still LIMIT / TOP is only used to get the the first xx messages, without it, you will get every message.
but you still have an error, without having access to the DB I can not help you more, I testing under MS SQL, MS Access and mySQL with a clean Snitz Forum, and all work fine, maybe someone else can help you on this, if I got the same error... but I get no errors whatsoever.< |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
|
|
bobby131313
Senior Member
USA
1163 Posts |
Posted - 02 March 2008 : 21:33:44
|
quote: ' 1.3 02.03.08 Updated with TopSQL() so it runs in mySQL as well (>4.x)
Is right out of the file on the server.
It's OK, like I said, I appreciate you trying.< |
Switch the order of your title tags |
|
|
kolucoms6
Average Member
845 Posts |
Posted - 12 March 2008 : 20:46:05
|
Suppose I have One message and 3 ppl replied to same message in last 5 mins.
So, it shows 3 different entries... which is an ODD way...
Cant we get it group by message ?< |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 13 March 2008 : 02:40:07
|
The MOD is done to include topic messages and replies to those messages!
that is the real "Last XX Messages", if you want only the messages in topics with no replies showing, all you need is to edit the SQL Query to suit your needs.
in your example, the MOD NEEDS to show 4 messages, the 1st message from the topic and the other 3 messages, unless it's a private forum, and that will not appear in the mod < |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
Edited by - balexandre on 13 March 2008 02:42:15 |
|
|
kolucoms6
Average Member
845 Posts |
Posted - 13 March 2008 : 11:27:29
|
Can u plz post the SQL for the same ?< |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 13 March 2008 : 14:03:02
|
to work with only TOPICS and not REPLIES:
search for:
and replace that for this:
have in mind that this query if for: Last XX Topics and not Last XX Messages.
hope it helps.< |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
Edited by - balexandre on 13 March 2008 14:05:59 |
|
|
kolucoms6
Average Member
845 Posts |
Posted - 13 March 2008 : 16:50:16
|
Worked.
Cool
Thanks for the Support.< |
|
|
balexandre
Junior Member
Denmark
418 Posts |
Posted - 14 March 2008 : 11:29:17
|
always glad to help the community< |
Bruno Alexandre (Strøby, DANMARK)
"a Portuguese in Danmark"
|
|
|
puzo
Junior Member
Israel
417 Posts |
Posted - 19 March 2008 : 17:02:57
|
Thank you, very useful.< |
|
|
|
championc
Starting Member
10 Posts |
Posted - 06 April 2008 : 18:36:18
|
Hi Bruno,
Super job. I have installed this against my mySQL installation and it worked perfectly first time.
I wonder if you have ever done a further mod to show the Forum Name - if not, what extra code would I need to do this. I know I would need to use the t.FORUM_ID to read the forum name (F_SUBJECT) from the forum_forum table
C < |
|
|
championc
Starting Member
10 Posts |
Posted - 08 April 2008 : 16:27:52
|
I worked it out - dead easy when it came down to it. I simply replaced the top line of the strsql from sqlstr = "SELECT " & _ "a.CAT_ID, a.FORUM_ID, a.TOPIC_ID, a.T_SUBJECT, a.MSG_ID, a.MSG, a.MSG_DATE, a.MEMBER_ID, a.M_NAME " & _
to sqlstr = "SELECT " & _ "a.CAT_ID, a.FORUM_ID, a.TOPIC_ID, a.T_SUBJECT, a.MSG_ID, a.MSG, a.MSG_DATE, a.MEMBER_ID, a.M_NAME, f.FORUM_ID, f.F_SUBJECT " & _
You can then use objRec.fields("F_SUBJECT") to retrieve the category description
C < |
|
|
gjs
Starting Member
5 Posts |
Posted - 03 June 2009 : 15:47:38
|
Hello.
I am using this cool mod on my forum, but now also want to integrate the events calendar mod.
However, the posts that go in the events calendar also come up in the most recent messages.
Can you give some modified SQL to exclude the posts added to the events calendar from coming up in the top x messages?
Many Thanks,
Greg. |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 04 June 2009 : 20:56:17
|
You may want to contact the author of this via e-mail through his profile. He may not see your question as quickly as you are perhaps needing the help. |
|
|
gjs
Starting Member
5 Posts |
Posted - 05 June 2009 : 16:36:47
|
Thanks for the suggestion - I'll try that now.
Regards,
Greg |
|
|
Topic |
|
|
|