close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

MySQli update server behavior not updating record

Thread began 4/01/2015 10:30 am by stephen287384 | Last modified 4/13/2015 6:31 pm by stephen287384 | 2340 views | 15 replies


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:

$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
$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']) ."");
$UpdateGoTo = "admin_control_panel.php";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";

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")) ."");

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...