Best of Talk (6/10/03)

 
May 29, 2003

by Dina Hess

Title: Is There a Good Way to Do This?
Date: 06/10/03      19 Posts
Summary: How would you use QuerySetCell() to change all single quotes in a query result set to double single quotes?

   <cfloop index="i" list="#q_threads.columnlist#">
      <cfset QuerySetCell(q_threads,i,
         replace(q_threads[i][currentrow],"'", "''","all"),
         currentrow)> 
      <cfset x=x+1 >
   </cfloop>
 
Title: CFC Newbie Discussion
Date: 06/10/03      24 Posts
Summary: Confused about CFC scopes? You can use "this" scope in a CFC if you want to make your data publicly accessible. It's probably best, though, to keep your data private. To do that, use the "unnamed" scope or create your own structure. But don't use the variables scope...there's a bug. Also, any variable created inside a method should be "var" scoped unless you want it to exist outside the method. This thread is packed ... a definite "must-read" for those seeking CFC clarity.
 
Title: Checking if CFAPPLICATION Has Run
Date: 06/10/03      10 Posts
Summary: Is it sensible to use the application scope for somewhat constant variables used inside a custom tag? That is a solid approach but for added clarity consider storing these variables in their own structure. Code to check whether CFAPPLICATION has run is included. This thread also contains an interesting discussion about storing CFAPPLICATION settings in the request scope to determine how CFAPPLICATION is configured.
 

Add a Comment
(If you subscribe, any new posts to this thread will be sent to your email address.)
  
Privacy | FAQ | Site Map | About | Guidelines | Contact | Advertising | What is ColdFusion?
House of Fusion | ColdFusion Jobs | Blog of Fusion | AHP Hosting