close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
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 | 1546 views | 15 replies

Jay1983

Jay329

Hi Ray,

I'm experiencing a similar issue. My database is not updating. Please see below. I'm passing the id from another page via URL. I suspect the issue may be the way the form action is setup. Thank you for your help.


<?php require_once('.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php require_once('webassist/mysqli/queryobj.php'); ?>
<?php
$UpdateTicketCount = new WA_MySQLi_RS("UpdateTicketCount",$xxxxxxxxx,1);
$UpdateTicketCount->setQuery("SELECT * FROM TicketCounts WHERE Id = ?");
$UpdateTicketCount->bindParam("i", "".(isset($_GET['Id'])?$_GET['Id']:"") ."", "-1"); //colname
$UpdateTicketCount->execute();
?>
<?php
if (isset($_POST['submit']) || isset($_POST["submit_x"])) {
$UpdateQuery = new WA_MySQLi_Query($xxxxxxx);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "TicketCounts";
$UpdateQuery->bindColumn("Artist", "s", "".($UpdateTicketCount->getColumnVal("Artist")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Venue", "s", "".($UpdateTicketCount->getColumnVal("Venue")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("ShowDate", "t", "".($UpdateTicketCount->getColumnVal("ShowDate")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("TotalSold", "i", "".($UpdateTicketCount->getColumnVal("TotalSold")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("PreviousDaySold", "i", "".($UpdateTicketCount->getColumnVal("PreviousDaySold")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Wrap", "i", "".($UpdateTicketCount->getColumnVal("Wrap")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Capacity", "i", "".($UpdateTicketCount->getColumnVal("Capacity")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Open", "i", "".($UpdateTicketCount->getColumnVal("Wrap")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Advance", "s", "".($UpdateTicketCount->getColumnVal("Advance")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Dos", "s", "".($UpdateTicketCount->getColumnVal("Dos")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("OnSaleDate", "t", "".($UpdateTicketCount->getColumnVal("OnSaleDate")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("TM", "i", "".($UpdateTicketCount->getColumnVal("TM")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Hold", "i", "".($UpdateTicketCount->getColumnVal("Hold")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("FanClub", "s", "".($UpdateTicketCount->getColumnVal("FanClub")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Consignment", "i", "".($UpdateTicketCount->getColumnVal("Consignment")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Sold", "i", "".($UpdateTicketCount->getColumnVal("Sold")) ."", "WA_DEFAULT");
$UpdateQuery->addFilter("Id", "=", "i", "".($_GET['Id']) ."");
$UpdateQuery->execute();
$UpdateGoTo = "index4.php";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$UpdateQuery->redirect($UpdateGoTo);
}
?>
<!doctype html>
<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
<!--[if IE 7]> <html class="ie7 oldie"> <![endif]-->
<!--[if IE 8]> <html class="ie8 oldie"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="">
<!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Untitled Document</title>
<link href="boilerplate.css" rel="stylesheet" type="text/css">
<link href="update.css" rel="stylesheet" type="text/css">

<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src="respond.min.js"></script>
</head>
<body>
<div class="gridContainer clearfix">
<div id="div1" class="fluid">


</div>

<section class="fluid UpdateTable">

<form action="index4.php?StoreID=<?php echo(intval($_GET["Id"])); ?>" name="submit" id="submit" method="post">


<table width="200" border="1">
<tbody>
<tr>
<td>Artist/Band: </td>
<td>
<input value= "<?php echo($UpdateTicketCount->getColumnVal("Artist")); ?>" />
</td>
</tr>
<tr>
<td>Venue: </td>
<td>
<input value= <?php echo($UpdateTicketCount->getColumnVal("Venue")); ?> maxlength="100" />
</td>
</tr>
<tr>
<td>Show Date:</td>
<td>
<input value = <?php echo($UpdateTicketCount->getColumnVal("ShowDate")); ?> /> </td>
</tr>
<tr>
<td>Total Sold:</td>
<td>

<input value = <?php echo($UpdateTicketCount->getColumnVal("TotalSold")); ?> />

</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>

<input type = "hidden" name ="Id" value = "<?php echo($UpdateTicketCount->getColumnVal('Id')); ?>" />

<input name="submit" type="submit" id="submit" value="Update Record">


</form>

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

Content

rating

Layout

rating

Ease of use

rating

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...