Im having this error when using IN statement in table Invoice with field name ProductSold
Warning: Invalid argument supplied for foreach() in directory\infusionsoft\mySDK.class.php on line 325
Kindly check my code:
$ProductSold = [600, 604];
$table = “Invoice”;
$query = array(‘ProductSold’ => $ProductSold);
$returnFields = array(‘AffiliateId’, ‘ContactId’, ‘CreditStatus’, ‘DateCreated’, ‘Description’, ‘Id’, ‘InvoiceTotal’, ‘InvoiceType’, ‘JobId’, ‘LastUpdated’, ‘LeadAffiliateId’, ‘PayPlanStatus’, ‘PayStatus’, ‘ProductSold’, ‘PromoCode’, ‘RefundStatus’, ‘Synced’, ‘TotalDue’, ‘TotalPaid’);
$result = $app->getObjects($table, $query, $returnFields);