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

dataassist stopped multiple insets and updates?

Thread began 4/25/2011 6:14 am by ijs174940 | Last modified 4/25/2011 1:50 pm by ijs174940 | 785 views | 5 replies

ijs174940Beta Tester

dataassist stopped multiple insets and updates?

Very strange but suddenly in the middle of designing a site I cannot get the multiple insert and update to work? I get no error in the page or via firebug I have

1) Uninstalled the extension and reinstalled it.
2) Updated the libary fix file
3) Deleted the WA_Dataassist folder
4) Removed all code from the page and remade it
5) Deleted wincache file

The page runs and there is no change to the db.

No idea of what to do next but I have to get this site finsihed in less than 24hrs so in a little bit of a panic. HELP..............

Code segment below

***************************************
<?php require_once('../Connections/GoCreate.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_GoCreate, $GoCreate);
$query_rs_DesignTypeDBAdd = "SELECT * FROM admin_media_type";
$rs_DesignTypeDBAdd = mysql_query($query_rs_DesignTypeDBAdd, $GoCreate) or die(mysql_error());
$row_rs_DesignTypeDBAdd = mysql_fetch_assoc($rs_DesignTypeDBAdd);
$totalRows_rs_DesignTypeDBAdd = mysql_num_rows($rs_DesignTypeDBAdd);

mysql_select_db($database_GoCreate, $GoCreate);
$query_rs_IncCheck = "SELECT * FROM des_res_type";
$rs_IncCheck = mysql_query($query_rs_IncCheck, $GoCreate) or die(mysql_error());
$row_rs_IncCheck = mysql_fetch_assoc($rs_IncCheck);
$totalRows_rs_IncCheck = mysql_num_rows($rs_IncCheck);?>
<?php
// WA DataAssist Multiple Inserts
if ("" == "") // Trigger
{
if (!session_id()) session_start();
$WA_loopedFields = array("ID", "Type");
$WA_connection = $GoCreate;
$WA_table = "des_res_type";
$WA_redirectURL = "";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_fieldNamesStr = "DESIGN_ID|TYPE";
$WA_columnTypesStr = "none,none,NULL|none,none,NULL";
$WA_insertIfNotBlank = "";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_connectionDB = $database_GoCreate;
$WA_multipleInsertCounter = 0;
mysql_select_db($WA_connectionDB, $WA_connection);
while (WA_AB_checkMultiInsertLoopedFieldsExist($WA_loopedFields, $WA_multipleInsertCounter)) {
if ($WA_insertIfNotBlank == "" || WA_AB_checkLoopedFieldsNotBlank(array($WA_insertIfNotBlank), $WA_multipleInsertCounter)) {
$WA_fieldValuesStr = "".WA_AB_getLoopedFieldValue("ID", $WA_multipleInsertCounter) ."" . "|" . "".WA_AB_getLoopedFieldValue("Type", $WA_multipleInsertCounter) ."";
$WA_fieldValues = explode("|", $WA_fieldValuesStr);
$insertParamsObj = WA_AB_generateInsertParams($WA_fieldNames, $WA_columns, $WA_fieldValues, -1);
$WA_Sql = "INSERT INTO `" . $WA_table . "` (" . $insertParamsObj->WA_tableValues . ") VALUES (" . $insertParamsObj->WA_dbValues . ")";
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
}
$WA_multipleInsertCounter++;
}
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 XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="#" method="post" name="form1" id="form1">
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_rs_DesignTypeDBAdd){
?>
<label for="ID"></label>
<input type="hidden" name="ID_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" id="ID_mihidden_<?php echo $RepeatSelectionCounter_1; ?>" value="1" />
<input name="ID_<?php echo $RepeatSelectionCounter_1; ?>" type="text" id="ID_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $_GET['ID'];?>" />
<label for="Type"></label>
<input name="Type_<?php echo $RepeatSelectionCounter_1; ?>" type="text" id="Type_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php echo $row_rs_DesignTypeDBAdd['ID']; ?>" />
<?php echo $row_rs_DesignTypeDBAdd['MEDIA_TYPE']; ?> <br />
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_rs_DesignTypeDBAdd && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_rs_DesignTypeDBAdd = mysql_fetch_assoc($rs_DesignTypeDBAdd);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
</form>
</body>
</html>
<?php
mysql_free_result($rs_DesignTypeDBAdd);

mysql_free_result($rs_IncCheck);
?>
*************************************

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