home Links Articles Books Past Meetings Photos SiteMap
The MDCFUG is sponsored by TeraTech. Visit us at www.TeraTech.com

Please send
comments/questions to



Cold Fusion 

Monday, December 6th

Class Notes



Reviewed <cfswitch>:


<CF SWITCH expression=#deleteaction#>

  <CFCASE value="delete">


  <CFCASE value="add">



     <!--- If none of the above --->





Named several CF tags which do close and those that don't:


DON'T CLOSE                                     DO CLOSE


Include                                                   Loop

Set                                                          Query

Locate                                                    Transaction

Abort                                                     Output

Update                                                   If Else

Param                                                     Switch



(Homework: define each tag listed above in your own words (not the book's) and send to the list.)



Created/modified select pages which sort records in ascending or descending order by using the following code:


<CFQUERY datasource="xxxxx"  name="xxxxx">


FROM table

<CFIF isdefined ("sortorder")>

ORDER BY #sortorder# #SortType#




The page called back to itself using URL parameters to change the sort order.


<A HREF="mypage.cfm?sortorder=FirstName&SortType=#SortType#">First Name</A>



  • # variables MUST be enclosed in CFOUTPUT tags to work - for all HTML - even an <A HREF> tag!
  • Multiple URL parameters are separated by &s.
  • No spaces allowed in URLs!
  • To "remember extra parameters they MUST be passed on the URL line too.


Used <CFPARAM> to avoid undefined variable errors.

<CFPARAM name="SortOrder" DEFAULT="">

<CFPARAM name="SortType" DEFAULT="">


Used the SQL ASC and DESC parameters of the ORDER BY clause for sort type.

Home | Links | Articles | Past Meetings | Meeting Photos | Site Map
About MDCFUG | Join | Mailing List |Forums | Directions |Suggestions | Quotes | Newbie Tips

Copyright © 1997-2018, Maryland Cold Fusion User Group. All rights reserved.
< >