Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Help ! I hope this is simple

Posted 26 Feb 2002 02:10:06
1
has voted
26 Feb 2002 02:10:06 Berry van Elk posted:
I need to add a extra filter to this records, the table field 'Soort' has to be the same as the entered valua 'News'. Can somebody help me add this extra to the existing code below ?

----------------------------------------------------------
SELECT *, (SELECT COUNT (*)
FROM NEWS_COMMENTS
WHERE NEWS_COMMENTS.NIEUWS_ID = ALGEMEENNIEUWS.NIEUWS_ID) AS LINK_COUNT FROM ALGEMEENNIEUWS
ORDER BY NIEUWS_ID DESC
----------------------------------------------------------

+ -
|Name |Default Value |Run-time Value

MMColParam 'News' Request("EmptyValue"

----------------------------------------------------------

*The field 'Soort' is in the table ALGEMEENNIEUWS.SOORT

Please help me, I try'd alot of things, it's something like 'WHERE Soort = 'MMColParam'' but where do I put it !?

I hope this is clear


<b></b><i></i>

Replies

Replied 27 Feb 2002 15:04:28
27 Feb 2002 15:04:28 Dennis van Galen replied:
let me see...

Have you tried something like:

SELECT *
FROM NEWS_COMMENTS
WHERE SOORT = MMColParam AND NEWS_COMMENTS.NIEUWS_ID = ALGEMEENNIEUWS.NIEUWS_ID
ORDER BY NIEUWS_ID DESC

+ -
|Name |Default Value |Run-time Value
MMColParam 'News' Request("MM_EmptyValue"

I believe that should work, it first looks for a value "News" in the 'Soort' fields and then it gets the rest of the comments on the news articles based on the article_id of your news item.

Hope this helps you...
Bovenop het nieuws...

With kind regards,

Dennis van Galen
Webmaster KPN Nederland
Financial and Information Services
Replied 28 Feb 2002 12:52:38
28 Feb 2002 12:52:38 Berry van Elk replied:
Thank you for the reply, I already solved the problem with the conditional region extension !

Reply to this topic