MySQli update server behavior not updating record
I have a MySQli update server behavior that is not updating the record but redirects to the correct page after i submit the form. Here is the code:
<?php
$rsStores = new WA_MySQLi_RS("rsStores",$PPUconn,1);
$rsStores->setQuery("SELECT * FROM stores WHERE StoreID = ?");
$rsStores->bindParam("i", "".(isset($_GET['StoreID'])?$_GET['StoreID']:"") ."", "-1"); //colname
$rsStores->execute();
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$UpdateQuery = new WA_MySQLi_Query($PPUconn);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "stores";
$UpdateQuery->bindColumn("StoreName", "s", "".((isset($_POST["StoreName"]))?$_POST["StoreName"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreLogo", "s", "".((isset($_POST["StoreLogo"]))?$_POST["StoreLogo"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreABN", "s", "".((isset($_POST["StoreABN"]))?$_POST["StoreABN"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreAbout", "s", "".((isset($_POST["StoreAbout"]))?$_POST["StoreAbout"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreFirstName", "s", "".((isset($_POST["StoreFirstName"]))?$_POST["StoreFirstName"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreSurname", "s", "".((isset($_POST["StoreSurname"]))?$_POST["StoreSurname"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StorePhone", "s", "".((isset($_POST["StorePhone"]))?$_POST["StorePhone"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreEmail", "s", "".((isset($_POST["StoreEmail"]))?$_POST["StoreEmail"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreURL", "s", "".((isset($_POST["StoreURL"]))?$_POST["StoreURL"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreAddress", "s", "".((isset($_POST["StoreAddress"]))?$_POST["StoreAddress"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreSuburb", "s", "".((isset($_POST["StoreSuburb"]))?$_POST["StoreSuburb"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StorePostcode", "s", "".((isset($_POST["StorePostcode"]))?$_POST["StorePostcode"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreTradingMon", "s", "".((isset($_POST["StoreTradingMon"]))?$_POST["StoreTradingMon"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreTradingTues", "s", "".((isset($_POST["StoreTradingTues"]))?$_POST["StoreTradingTues"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreTradingWed", "s", "".((isset($_POST["StoreTradingWed"]))?$_POST["StoreTradingWed"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreTradingThurs", "s", "".((isset($_POST["StoreTradingThurs"]))?$_POST["StoreTradingThurs"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreTradingFri", "s", "".((isset($_POST["StoreTradingFri"]))?$_POST["StoreTradingFri"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreTradingSat", "s", "".((isset($_POST["StoreTradingSat"]))?$_POST["StoreTradingSat"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("StoreTradingSun", "s", "".((isset($_POST["StoreTradingSun"]))?$_POST["StoreTradingSun"]:"") ."", "WA_DEFAULT");
$UpdateQuery->addFilter("StoreID", "=", "i", "".($_GET['StoreID']) ."");
$UpdateQuery->execute();
$UpdateGoTo = "admin_control_panel.php";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$UpdateQuery->redirect($UpdateGoTo);
}
?>
The results page has a link that passes the StoreID to the update page as a URL variable and the correct record loads but when i submit he form on the update page, it doesn't update but still redirects to the correct page as if it has.
I have also tried this for the lookup value:
$UpdateQuery->addFilter("StoreID", "=", "i", "".($rsStores->getColumnVal("StoreID")) ."");