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

Untitled

By: a guest on Dec 6th, 2011  |  syntax: ColdFusion  |  size: 0.87 KB  |  hits: 89  |  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. if ( searchField == "transactionId" ) {
  2.         var txParams = [];
  3.  
  4.         var txSQL = "SELECT `transactionId` FROM `braintreeTransaction` WHERE `btTransactionId` = ?";
  5.         arrayAppend( txParams, searchCriterion );
  6.         if ( isNumeric ( searchCriterion ) ) {
  7.                 txSQL &= " OR `id` = ?";
  8.                 arrayAppend( txParams, searchCriterion );
  9.         }
  10.         txSQL &= " UNION SELECT `transactionId` FROM `payflowproTransaction` WHERE `pnRef` = ?";
  11.         arrayAppend( txParams, searchCriterion );
  12.         if ( isNumeric ( searchCriterion ) ) {
  13.                 txSQL &= " OR `id` = ?";
  14.                 arrayAppend( txParams, searchCriterion );
  15.         }
  16.         txSQL &= " UNION SELECT `transactionId` FROM `paypalTransaction` WHERE `ppTransactionId` = ?;"
  17.         arrayAppend( txParams, searchCriterion );
  18.         if ( isNumeric ( searchCriterion ) ) {
  19.                 txSQL &= " OR `id` = ?";
  20.                 arrayAppend( txParams, searchCriterion );
  21.         }
  22.         var txIds = variables.orm.execute( txSQL, txParams );
  23. }
  24.