Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ColdFusion ORM Call method from EntityLoad in cfscript
  2. <cfscript>
  3.  
  4.    transaction {
  5.  
  6.        dataLoad = EntityLoad("trans");  
  7.    }
  8.  
  9. </cfscript>
  10.        
  11. <cfloop array="#dataLoad#" index="x">
  12.  
  13.     <cfoutput>#x.getCompanyName()#</cfoutput>
  14.  
  15. </cfloop>
  16.        
  17. <cfscript>
  18.  
  19.     for (x=1;x <= ArrayLen(dataLoad);x=x+1){
  20.  
  21.         writeOutPut(dataLoad.companyName());            
  22.  
  23.     }
  24.  
  25. </cfscript>
  26.        
  27. for ( var x in dataLoad ) {
  28.  x.getCompanyName();
  29. }
  30.        
  31. <cfscript>
  32.  
  33. transaction {
  34.     dataLoad = entityLoad("trans");
  35. }
  36.  
  37. for ( var i = 1; i <= arrayLen( dataLoad ); i++ ) {
  38.     writeOutput( dataLoad[i].companyName() );
  39. }
  40.  
  41. </cfscript>