
Untitled
By: a guest on
Dec 6th, 2011 | syntax:
ColdFusion | size: 0.87 KB | hits: 89 | expires: Never
if ( searchField == "transactionId" ) {
var txParams = [];
var txSQL = "SELECT `transactionId` FROM `braintreeTransaction` WHERE `btTransactionId` = ?";
arrayAppend( txParams, searchCriterion );
if ( isNumeric ( searchCriterion ) ) {
txSQL &= " OR `id` = ?";
arrayAppend( txParams, searchCriterion );
}
txSQL &= " UNION SELECT `transactionId` FROM `payflowproTransaction` WHERE `pnRef` = ?";
arrayAppend( txParams, searchCriterion );
if ( isNumeric ( searchCriterion ) ) {
txSQL &= " OR `id` = ?";
arrayAppend( txParams, searchCriterion );
}
txSQL &= " UNION SELECT `transactionId` FROM `paypalTransaction` WHERE `ppTransactionId` = ?;"
arrayAppend( txParams, searchCriterion );
if ( isNumeric ( searchCriterion ) ) {
txSQL &= " OR `id` = ?";
arrayAppend( txParams, searchCriterion );
}
var txIds = variables.orm.execute( txSQL, txParams );
}