close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Support here is a disgrace - Update Multiple Records is a failure

Thread began 2/24/2010 4:37 am by Jaffa | Last modified 2/25/2010 7:04 pm by Jaffa | 1773 views | 16 replies |

Jaffa

Update Multiple Records only updating last record

Looks like Web Assist is dead in the water, No response, no help. Why don't you hire more support help or do something here to answer questions. After joining your monthly subscriptions I feel i have been taken for a ride with the buggy half implemented extensions that are being developed.

Here's the code that your DATAASSIST Update Multi Records produces. It simply does not work at all. How can this issue still go unanswed all this time.

<?php require_once('../Connections/Database.php'); ?>
<?php require_once("../WA_DataAssist/WA_AppBuilder_PHP.php"); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

mysql_select_db($database_Database, $Database);
$query_rsFish = "SELECT TID, NAME, ENABLED FROM TropicalFish WHERE ENABLED = 'Yes' ORDER BY NAME ASC";
$rsFish = mysql_query($query_rsFish, $Database) or die(mysql_error());
$row_rsFish = mysql_fetch_assoc($rsFish);
$totalRows_rsFish = mysql_num_rows($rsFish);?>
<?php
// WA DataAssist Multiple Updates
if ($_SERVER["REQUEST_METHOD"] == "POST") // Trigger
{
if (!session_id()) session_start();
$WA_loopedIDField = array("WADA_RepeatID_TID");
$WA_connection = $Database;
$WA_table = "TropicalFish";
$WA_redirectURL = "TropicalFish_Results-Enabled.php";
$WA_keepQueryString = false;
$WA_indexField = "TID";
$WA_fieldNamesStr = "NAME|ENABLED";
$WA_columnTypesStr = "',none,''|',none,''";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_Database;
$WA_multipleUpdateCounter = 0;
mysql_select_db($WA_connectionDB, $WA_connection);
while (WA_AB_checkLoopedFieldsNotBlank($WA_loopedIDField, $WA_multipleUpdateCounter)) {
$WA_fieldValuesStr = "".WA_AB_getLoopedFieldValue("Name", $WA_multipleUpdateCounter) ."" . "|" . "".WA_AB_getLoopedFieldValue("Enabled", $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());
$WA_multipleUpdateCounter++;
}
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);
}
}
?>
<?php
// RepeatSelectionCounter_1 Initialization
$RepeatSelectionCounter_1 = 0;
$RepeatSelectionCounterBasedLooping_1 = false;
$RepeatSelectionCounter_1_Iterations = "1";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test</title>
</head>

<body>
<form name="form1" method="post" action="">
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_rsFish){
?>
<table width="40%" border="0" cellspacing="0" cellpadding="5">
<tr>
<th>Name</th>
<th>Status</th>
</tr>
<?php do { ?>
<tr>
<td><label>
<input type="hidden" name="WADA_RepeatID_TID_<?php echo $RepeatSelectionCounter_1; ?>" id="WADA_RepeatID_TID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsFish["TID"]; ?>" />
<input name="Name_<?php echo $RepeatSelectionCounter_1; ?>" type="text" id="Name_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsFish['NAME']; ?>">
<input name="ID_<?php echo $RepeatSelectionCounter_1; ?>" type="hidden" id="ID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsFish['TID']; ?>">
</label></td>
<td><label>
<input name="Enabled_<?php echo $RepeatSelectionCounter_1; ?>" type="text" id="Enabled_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rsFish['ENABLED']; ?>">
</label></td>
</tr>
<?php } while ($row_rsFish = mysql_fetch_assoc($rsFish)); ?>
</table>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<td>No records match your request.</td>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_rsFish && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_rsFish = mysql_fetch_assoc($rsFish);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
<p>
<label>
<input type="submit" name="Update" id="Update" value="Submit">
</label>
</p>
</form>
</body>
</html>
<?php
mysql_free_result($rsFish);
?>

I have not touched this code at all so it's fair to say it's not end user error, I would appreciate your attention to this matter ASAP or at least have the courtesy to answer any of my posts or provide a solution to your half baked extension called Data Assist

Sign in to reply to this post

Ray BorduinWebAssist

What do you mean by "simply doesn't work at all"?

Do you get errors? Does it redirect after you submit?

Do the repeated records show in the form correctly and just the update doesn't work? Do you have a URL where I can see the problem live?

Please describe your problem in detail instead of your personal opinions about the quaility of work I provide. If you were as precise about describing the problem as you are in bad-mouthing our team, it would be a more constructive approach to actually solving the problem.

Sign in to reply to this post

Office Guy-172461

  Looks like Web Assist is dead in the water, No response, no help.  

I'd also like to point out that your 3 requests for help in multiple threads were made outside of normal support hours. Australia is in a different time zone.

10 Tips for getting quick help from a support forum
http://www.ipvac.com/kb/entry/149/

Sign in to reply to this post

Jaffa

OK the update mutiple record behaviour after spending almost 13 hours on it looks to only update the last record. There have been mutiple threads on this issue and no solutions.

I have attached my php page here.

Attached Files
Tropical_Enabled.zip
Sign in to reply to this post

Jaffa

can someone please help here! 2 days now.

Sign in to reply to this post

Jaffa

Still waiting for a fix to this problem

Sign in to reply to this post

Dave BuchholzBeta Tester

The WA guys are in bed, you have to bear in mind that they work Pacific Standard Time which in 19 hours behind you approx

I have attached a revised version of your page which will work, the basic issue you have is that the repeat selection iteration code needs to be inside the standard DW loop

Attached Files
Tropical_Enabled.zip
Sign in to reply to this post

Jaffa

Dave you are a gem.

Thanxs so much for fixing the code and explaining what the problem was.

Cheers mate!

Sign in to reply to this post

Dave BuchholzBeta Tester

No worries, just bear in mind when complaining about support in the future that your working day does not coincide with WA's apart from a small window so please be patient it's not that people don't want to help you it's that their probably in bed !

Sign in to reply to this post

Jaffa

One question I just ran the wizard again and got the same code that i attached, Is there a known bug in this feature? The attachment you sent worked fine but it certainly does not reflect what DA creates.

Sign in to reply to this post
loading

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