Ability to add more than one filter to update / delete SB's
It would be nice to have the option to be able to add more than one filter field in the wizard. It works when add them by hand e.g.
$UpdateQuery = new WA_MySQLi_Query($connMySQLi);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "tbl_store_models_info";
$UpdateQuery->bindColumn("sell_code", "s", "".$rsMoveModelInfo->getColumnVal('sell_code') ."", "WA_IGNORE");
$UpdateQuery->bindColumn("store_SKU", "s", "".$rsMoveModelInfo->getColumnVal('store_SKU') ."", "WA_IGNORE");
$UpdateQuery->bindColumn("tstampupdate", "i", "".$rsMoveModelInfo->getColumnVal('tstampinsert') ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("dateupdate", "t", "".date('Y-m-d', $rsMoveModelInfo->getColumnVal('tstampinsert')) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("adminupdate", "i", "".$rsMoveModelInfo->getColumnVal('adminID') ."", "WA_DEFAULT");
$UpdateQuery->addFilter("SKU", "=", "s", "".$rsMoveModelInfo->getColumnVal('SKU') ."");
$UpdateQuery->addFilter("storeID", "=", "i", "".$storeID .""); // extra filter
$UpdateQuery->execute();
But when I print the SQL statement to the page using
print "<p>".$UpdateQuery->debugSQL(); // print sql to page
It actually prints the filter values the wrong way round e.g.
UPDATE tbl_store_models_info SET `store_SKU` = , `tstampupdate` = 741, `dateupdate` = 1499078976, `adminupdate` = 2017-07-03 WHERE `SKU` = 7 AND `storeID` = JGB635DEKBB
i.e. JGB635DEKBB is the SKU & 7 is the storeID but it works and everything is entered in the DB correctly
Regards,
Dave Buchholz
I-CRE8 Limited