troubleshooting Question

Pulling individual rows from database and creating a URL

Avatar of mel150
mel150 asked on
Web Servers
2 Comments1 Solution186 ViewsLast Modified:
Hi,

 On the main page of my website, I have several short news headlines. Then I say, click here to read more, and I go to to page called article.cfm, where I want to have only that article's story. Here is the code I use:

         <cfquery name="qNews" datasource="cfDynavar" dbtype="ODBC" username="terry" password="99luft">  
            SELECT news2.articleid, news2.shortdesc, news2.longdesc, news2.date, news2.htmlcontents
            FROM news2
            ORDER by articleid DESC;
            </cfquery><br>
   
        <cfoutput maxrows="3" startrow="1" query="qNews">
                        <span class="subheaders">#date#</span><br><span class="subblue">#shortdesc#&nbsp;</span><br>
                #longdesc#<br>
                     <cfif #htmlcontents# is NOT "">
                  <A href="blocks/article.cfm&amp;articleid=#articleid#"></CFIF>
                  To read more click here</A></span><br><br>
            </CFOUTPUT>

This is where I am having trouble:
<A href="blocks/article.cfm&amp;articleid=#articleid#"></CFIF>

 If I go to http:mywebsite/blocks/article.cfm, I see all the news stories in my database. But I get a 404 not found error if I go to http:mywebsite/blocks/article.cfm&articleid=50. This method works on my other website, but there I'm using CFcase, and the address is http:mywebsite/index.cfm?fuseaction=article&articleid=50.

Any thoughts? Thanks as always!!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros