Thanks for posting the code, it is helpful. Next time you would like to post with the code of the page it may be better to attach it in a zip archive, this way we can see the line numbers and stuff like that.
In the code you posted I have added some debug statements to the update server behavior. I added a variable that will hold the update sql, then it will print out all of the update statements so we can take a look at them.
Please make a backup of this page and test it with the updated code and let us know what the result is.
Updated Multiple update server behavior:
<?php
// WA DataAssist Multiple Updates
if ($_SERVER["REQUEST_METHOD"] == "POST") // Trigger
{
$the_updates = "";
if (!session_id()) session_start();
$WA_loopedIDField = array("WADA_RepeatID_ItemID");
$WA_connection = $mayther;
$WA_table = "items";
$WA_redirectURL = "admin-change-the-order.php";
$WA_keepQueryString = false;
$WA_indexField = "ItemID";
$WA_fieldNamesStr = "ItemOrder";
$WA_columnTypesStr = "none,none,NULL";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_mayther;
$WA_multipleUpdateCounter = 0;
mysql_select_db($WA_connectionDB, $WA_connection);
while (WA_AB_checkLoopedFieldsNotBlank($WA_loopedIDField , $WA_multipleUpdateCounter)) {
$WA_fieldValuesStr = "".WA_AB_getLoopedFieldValue("ItemOrderChange" , $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 . "";
$the_updates .= "<br/>" . $WA_Sql;
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
$WA_multipleUpdateCounter++;
}
die($the_updates);
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);
}
}
?>