I think you want IN, not LIKE

WHERE articleID IN (#getArticle.articleRelatedLinks#)

will pull articles 26, 43, and 53.


On Tue, 16 Nov 2004 19:07:29 +0000, Stuart Kidd <[EMAIL PROTECTED]> wrote:
> Hi guys,
> 
> Thanks for the help on the List Contains stuff, once I get the rest of the
> app done I will try and make the separate Relations table.
> 
> I'm having problems with the LIKE function in SQL.
> 
> In my relatedArticles field I have numbers like 26,43,53
> 
> <cfquery name="relatedArticles" datasource="user020">
> SELECT articleID, articleTitle
> WHERE articleID LIKE '#GetArticle.articleRelatedLinks#'
> </cfquery>
> 
> <cfif relatedArticles.RecordCount GT 0>
>    Other articles that may relate to this story are:<br>
>     <cfoutput query="relatedArticles">#articleTitle#</cfoutput>
> <cfelse>NOTHING here.
> 
> </cfif>
> 
> When I CFOUTPUT the relatedArticles it shows me 26,43,53 however when I use
> the I try show the results in the <cfif> tag it actually thinks that no
> articles have been pulled???  Strange, can anyone see what I am doing wrong?
> 
> Thanks,
> 
> Stu
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184443
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to