Good Morning!

I've got an array that worked, other than when content contained a comma (of
course)... and because a comma is a common character that is actually
required in these fields, I wanted to change the delimiter in my array to a
|.  I made the change below, but I'm no longer having any results returned.
Can anybody help me find out why?

--
Jillian

*** *** ***

CODE:

        <cfquery name="whatsnewlink" datasource="cts">
        SELECT  id, 
                        name, 
                        url, 
                        datebox
        FROM            link 
        WHERE   link.include = 'yes' AND datebox >= #now()#
        </cfquery>

        <cfquery name="whatsnewgs" datasource="cts">
        SELECT  id, 
                        title AS name, 
                        url, 
                        datebox
        FROM            gs 
        WHERE   gs.include = 'yes' AND datebox >= #now()#
        </cfquery>

        <cfquery name="whatsnewevents" datasource="cts">
        SELECT  id, 
                        title AS name, 
                        url, 
                        datebox 
        FROM            events 
        WHERE           events.include = 'yes' AND datebox >= #now()#
        </cfquery>
        
        <cfquery name="whatsnewprof" datasource="cts">
        SELECT  id, 
                        title AS name, 
                        url, 
                        datebox 
        FROM            professional 
        WHERE   professional.include = 'yes' AND datebox >= #now()#
        </cfquery>
        
        <cfquery name="whatsnewresearch" datasource="cts">
        SELECT  id, 
                        title AS name, 
                        url, 
                        datebox 
        FROM            research 
        WHERE   research.include = 'yes' AND datebox >= #now()#
        </cfquery>
        
        <cfscript>
        pound = chr(35); // ascii for "#" character
        </cfscript>
                
        <cfset whatsnew = arraynew(1)> 
        <cfset i=0>
        
        <p>
        <cfloop Query="whatsnewlink">
                <cfset i = i + 1>
                <cfset whatsnew[i] = "#datebox#|#name#|#url#|#id#|link">
                <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |",
"ALL")> 
        </cfloop>
        <cfloop Query="whatsnewgs">
                <cfset i = i + 1>
                <cfset whatsnew[i] = "#datebox#|#name#|#url#|#id#|gs">
                <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |",
"ALL")> 
        </cfloop>
        <cfloop Query="whatsnewevents">
                <cfset i = i + 1>
                <cfset whatsnew[i] = "#datebox#|#name#|#url#|#id#|events"> 
                <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |",
"ALL")> 
        </cfloop>
        <cfloop Query="whatsnewprof">
                <cfset i = i + 1>
                <cfset whatsnew[i] =
"#datebox#|#name#|#url#|#id#|professional">
                <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |",
"ALL")>  
        </cfloop>
        <cfloop Query="whatsnewresearch">
                <cfset i = i + 1>
                <cfset whatsnew[i] = "#datebox#|#name#|#url#|#id#|research">

                <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |",
"ALL")> 
        </cfloop>

        <cfset isSuccessful = ArraySort(whatsnew, "textnocase", "desc")>


<cfoutput>
<cfloop index="K" from="1" to="#i#">
        <cfif ListLast(whatsnew[k]) EQ "link">
                <tr>
                <td bgcolor=ddd9ea
class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a
href=http://#ListGetAt(whatsnew[k],3,"|")# class="smtext"> >> </a></td>
                </tr>
        <cfelseif ListLast(whatsnew[k]) EQ "gs">
                <tr>
                <td bgcolor=ddd9ea
class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a
href=http://www.lung.ca/cts/guidelines.cfm#pound##ListGetAt(whatsnew[k],4,"|
")# class="smtext"> >> </a></td>
                </tr>
        <cfelseif ListLast(whatsnew[k]) EQ "events">
                <tr>
                <td bgcolor=ddd9ea
class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a
href=http://www.lung.ca/cts/events.cfm#pound##ListGetAt(whatsnew[k],4,"|")#
class="smtext"> >> </a></td>
                </tr>
        <cfelseif ListLast(whatsnew[k]) EQ "professional">
                <tr>
                <td bgcolor=ddd9ea
class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a
href=http://www.lung.ca/cts/prodev.cfm#pound##ListGetAt(whatsnew[k],4,"|")#
class="smtext"> >> </a></td>
                </tr>
        <cfelseif ListLast(whatsnew[k]) EQ "research">
                <tr>
                <td bgcolor=ddd9ea
class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a
href=http://www.lung.ca/cts/research.cfm#pound##ListGetAt(whatsnew[k],4,"|")
# class="smtext"> >> </a></td>
                </tr>
        </cfif>
</cfloop>
</cfoutput>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to