Romee
Junior Member
 
Netherlands
180 Posts |
Posted - 14 May 2002 : 05:38:14
|
I use the snitz forum for a project in which we archive the old numbers of our beekeeping magazine (since 1898). I made a cat to a certain year, a forum is a month, and each topic is an article. Works fine, but you get an awfull lot of forums and cats. No problem for the scanners, but I don't want users to be on the forum. So I made a search engine with Ultra Dev. for the forum sql7 db. It is in dutch but you can see it on http://www.bijen.info/maandblad/zoek.asp
It works fine and was pleased with myself untill one lady told me that sometimes the "good" subject is connected with the wrong article. She is right, and the cause is that several articles have the same subjectline.
I shall describe what I did, hoping that some clever person can hint me towards a solution.
On my search page I use this statement,
SELECT Forum_CATEGORY.CAT_NAME, Forum_FORUM.F_SUBJECT, Forum_TOPICS.T_SUBJECT, Forum_TOPICS.T_MESSAGE FROM Forum_FORUM INNER JOIN (Forum_CATEGORY INNER JOIN Forum_TOPICS ON Forum_CATEGORY.CAT_ID = Forum_TOPICS.CAT_ID) ON (Forum_CATEGORY.CAT_ID = Forum_FORUM.CAT_ID) AND (Forum_FORUM.FORUM_ID = Forum_TOPICS.FORUM_ID) AND (Forum_FORUM.CAT_ID = Forum_TOPICS.CAT_ID) WHERE Forum_CATEGORY.CAT_ID LIKE 'varCatId' AND Forum_FORUM.F_SUBJECT LIKE '%varForumName%'
That works fine, I get the subjects of the articles I want. Next thing is that I pass T_SUBJECT as URL parameter to my detailpage.
On my detailpage I use this statement:
SELECT [Forum_TOPICS].[T_SUBJECT], [Forum_TOPICS].[T_MESSAGE], [Forum_TOPICS].[T_AUTHOR], [Forum_TOPICS].[T_DATE], [Forum_MEMBERS].[MEMBER_ID], [Forum_MEMBERS].[M_NAME], [Forum_MEMBERS].[M_PHOTO_URL], [Forum_MEMBERS].[M_AVATAR_URL] FROM Forum_MEMBERS INNER JOIN Forum_TOPICS ON [Forum_MEMBERS].[MEMBER_ID] =[Forum_TOPICS].[T_AUTHOR];
That works fine, I get the articles with complete message text. However, there are in my db a lot of articles with the same subjectline. The unwanted result, as described, is that I have the wrong article in combination with the good subjectline. I can understand that, since I only passed the T_SUBJECT as URL parameter.
How can I solve this. How can I pass the URL parameter in a way, that it takes that specific subjectline from that specific forum, in that specific cat.
Would appreciate your help very much. Romée
|
|