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

DataAssist Multiple Record Update not updating records

Thread began 3/22/2010 11:21 am by kevin347925 | Last modified 3/23/2010 1:52 pm by kevin347925 | 1688 views | 9 replies


DataAssist Multiple Record Update not updating records


I have spent a lot of time trying to get the multiple record update behavior to work, and I have not been successful. From other forum posts, I know that there is a bug, but I am unable to fix it in my code. Is the DataAssist version update coming soon? The code is pasted below. Help would be very much appreciated.

// WA DataAssist Multiple Updates
if (isset($_POST["updateshow"])) // Trigger
if (!session_id()) session_start();
$WA_loopedIDField = array("WADA_RepeatID_DataID");
$WA_connection = $conn_dynamic;
$WA_table = "DynamicData";
$WA_redirectURL = "MANAGEslideshow.php";
$WA_keepQueryString = false;
$WA_indexField = "DataID";
$WA_fieldNamesStr = "MakeSlide|SlideTitle|HideSlide|ButtonLabel|ButtonOrder";
$WA_columnTypesStr = "',none,''|',none,''|',none,''|',none,''|',none,''";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_conn_dynamic;
$WA_multipleUpdateCounter = 0;
mysql_select_db($WA_connectionDB, $WA_connection);
while (WA_AB_checkLoopedFieldsNotBlank($WA_loopedIDField, $WA_multipleUpdateCounter)) {
$WA_fieldValuesStr = "".WA_AB_getLoopedFieldValue("removeslide", $WA_multipleUpdateCounter) ."" . "|" . "".WA_AB_getLoopedFieldValue("slidetitle", $WA_multipleUpdateCounter) ."" . "|" . "".WA_AB_getLoopedFieldValue("showslide", $WA_multipleUpdateCounter) ."" . "|" . "".WA_AB_getLoopedFieldValue("buttontitle", $WA_multipleUpdateCounter) ."" . "|" . "".WA_AB_getLoopedFieldValue("slideorder", $WA_multipleUpdateCounter) ."";
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$WA_where_fieldValuesStr = WA_AB_getLoopedFieldValue($WA_loopedIDField[0], $WA_multipleUpdateCounter);
$WA_where_columnTypesStr = "none,none,NULL";
$WA_where_comparisonStr = "=";
$WA_where_fieldNames = explode("|", $WA_indexField);
$WA_where_fieldValues = explode("|", $WA_where_fieldValuesStr);
$WA_where_columns = explode("|", $WA_where_columnTypesStr);
$WA_where_comparisons = explode("|", $WA_where_comparisonStr);
$updateParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WhereObj = WA_AB_generateWhereClause($WA_where_fieldNames, $WA_where_columns, $WA_where_fieldValues, $WA_where_comparisons );
$WA_Sql = "UPDATE `" . $WA_table . "` SET " . $updateParamsObj->WA_setValues . " WHERE " . $WhereObj->sqlWhereClause . "";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
if ($WA_redirectURL != "") {
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
header("Location: ".$WA_redirectURL);
// RepeatSelectionCounter_1 Initialization
$RepeatSelectionCounter_1 = 0;
$RepeatSelectionCounterBasedLooping_1 = false;
$RepeatSelectionCounter_1_Iterations = "1";


<form name="form1" method="post" action="">
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
if($RepeatSelectionCounterBasedLooping_1 || $row_rs_slideshow){
<table class="tableinfo" width="100%" border="0" cellspacing="0" cellpadding="0">
<th>Slide Order:</th>
<th>Slide Title:</th>
<th>Button Title:</th>
<th>Category<br />(optional):</th>
<th>Show<br />Slide:</th>
<th>Remove<br />Slide:</th>
<?php do { ?>
<td style="border-left:#46290D 1px dotted; width:50px;"><label><input type="hidden" name="WADA_RepeatID_DataID_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_DataID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rs_slideshow["DataID"]; ?>" />
<input class="slideinput" type="text" name="slideorder_<?php echo $RepeatSelectionCounter_1; ?>" id="slideorder_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rs_slideshow['ButtonOrder']; ?>"></label></td>
<td><label><input class="slideinput" type="text" name="slidetitle_<?php echo $RepeatSelectionCounter_1; ?>" id="slidetitle_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rs_slideshow['SlideTitle']; ?>"></label></td>
<td><label><input class="slideinput" type="text" name="buttontitle_<?php echo $RepeatSelectionCounter_1; ?>" id="buttontitle_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rs_slideshow['ButtonLabel']; ?>"></label></td>
<td style="vertical-align:middle; text-align:center; width:50px;"><a href="DYNAMICresults.php?cat=<?php echo $row_rs_slideshow['Category']; ?>" target="_blank"><?php echo $row_rs_slideshow['Category']; ?></a></td><td style="padding:10px;"><label><a href="DYNAMICdetail.php?DataID=<?php echo $row_rs_slideshow['DataID']; ?>">edit</a></label></td>
<td><input <?php if (!(strcmp($row_rs_slideshow['HideSlide'],"show"))) {echo "checked=\"checked\"";} ?> type="checkbox" name="showslide_<?php echo $RepeatSelectionCounter_1; ?>" id="showslide_<?php echo $RepeatSelectionCounter_1; ?>" value="show"></td>
<td><label><input type="checkbox" name="removeslide_<?php echo $RepeatSelectionCounter_1; ?>" id="removeslide_<?php echo $RepeatSelectionCounter_1; ?>" value=""></label></td>
<?php } while ($row_rs_slideshow = mysql_fetch_assoc($rs_slideshow)); ?>
<td style="border-left:#46290D 1px dotted; padding:20px 50px;" colspan="7">
<div align="center">
<input class="button" style="font-family:Arial;" type="submit" name="updateshow_<?php echo $RepeatSelectionCounter_1; ?>" id="updateshow_<?php echo $RepeatSelectionCounter_1; ?>" value="Update Slides">
} // RepeatSelectionCounter_1 Begin Alternate Content
<td>No records match your request.</td>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_rs_slideshow && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_rs_slideshow = mysql_fetch_assoc($rs_slideshow);
} // RepeatSelectionCounter_1 End Loop

Thank you in advance.


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