close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Dynamic Connections generation error message

Thread began 11/29/2015 1:32 pm by Zafar Iqbal | Last modified 12/14/2015 10:14 am by Zafar Iqbal | 4238 views | 11 replies

Zafar Iqbal

Here are Codes

It is in local environment I was just testing these extension and got this error message, if I use Dynamic SQL Connection there is not error, but I cannot use the SQLi Server behaviors, with any other extension such as Database or Security Assist, because these extensions are not recognizing this extension vise versa when I use Dynamic SQLi Connection with Database or Security Assist then it generate this error I send you the codes.

--------------- PHP Page Starts ---------------------
<?php require_once("webassist/form_validations/wavt_scripts_php.php"); ?>
<?php require_once("webassist/form_validations/wavt_validatedform_php.php"); ?>
<?php
if ((isset($_GET["Search"]) || isset($_GET["Search_x"])) && !isset($_GET["invalid"])) {
$WAFV_Redirect = "products_search.php?invalid=true";
$_SESSION['WAVT_productssearch_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateNM((isset($_GET["ProductPrice"])?$_GET["ProductPrice"]:"") . "","","",2,"",false,1);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"productssearch");
}
}
?>
<?php require_once('Connections/Conn_WebAssist.php'); ?>
<?php require_once("webassist/database_management/wa_appbuilder_php.php"); ?>
<?php require_once("webassist/database_management/wada_search.php"); ?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: WADAproducts;
//Searchpage: products_search.php;
//Form: WADASearchForm;
$WADbSearch1_DefaultWhere = "";
if (!session_id()) session_start();
if (isset($_GET["Search"]) || isset($_GET["Search_x"])) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations

//comparison list additions
$WADbSearch1->addComparisonFromEdit("ProductName","ProductName","AND","=",0);
$WADbSearch1->addComparisonFromEdit("ProductMetaKeywords","ProductMetaKeywords","AND","=",0);
$WADbSearch1->addComparisonFromEdit("ProductPrice","ProductPrice","AND","=",1);

//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_products_results"]=$WADbSearch1->whereClause;
}
}
else {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//get the filter definition from a session variable
if (1 == 1) {
if (isset($_SESSION["WADbSearch1_products_results"]) && $_SESSION["WADbSearch1_products_results"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_products_results"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';
?>
<?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;
}
}
?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
?>
<?php
$maxRows_WADAproducts = 9;
$pageNum_WADAproducts = 0;
if (isset($_GET['pageNum_WADAproducts'])) {
$pageNum_WADAproducts = $_GET['pageNum_WADAproducts'];
}
$startRow_WADAproducts = $pageNum_WADAproducts * $maxRows_WADAproducts;

mysql_select_db($database_Conn_WebAssist, $Conn_WebAssist);
$query_WADAproducts = "SELECT ProductID, ProductThumb, ProductShortDesc, ProductName, ProductShortDesc, ProductPrice FROM products";
setQueryBuilderSource($query_WADAproducts,$WADbSearch1,false);
$query_limit_WADAproducts = sprintf("%s LIMIT %d, %d", $query_WADAproducts, $startRow_WADAproducts, $maxRows_WADAproducts);
$WADAproducts = mysql_query($query_limit_WADAproducts, $Conn_WebAssist) or die(mysql_error());
$row_WADAproducts = mysql_fetch_assoc($WADAproducts);

if (isset($_GET['totalRows_WADAproducts'])) {
$totalRows_WADAproducts = $_GET['totalRows_WADAproducts'];
} else {
$all_WADAproducts = mysql_query($query_WADAproducts, $Conn_WebAssist);
$totalRows_WADAproducts = mysql_num_rows($all_WADAproducts);
}
$totalPages_WADAproducts = ceil($totalRows_WADAproducts/$maxRows_WADAproducts)-1;
?>
<?php
$queryString_WADAproducts = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_WADAproducts") == false &&
stristr($param, "totalRows_WADAproducts") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_WADAproducts = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_WADAproducts = sprintf("&totalRows_WADAproducts=%d%s", $totalRows_WADAproducts, $queryString_WADAproducts);
?>
<?php
// WA Application Builder Delete
if (isset($_POST["Delete"]) || isset($_POST["Delete_x"])) // Trigger
{
$WA_connection = $Conn_WebAssist;
$WA_table = "products";
$WA_redirectURL = "products_results.php?ProductID=".((isset($_POST["WADADeleteRecordID"]))?$_POST["WADADeleteRecordID"]:"") ."";
if (function_exists("rel2abs")) $WA_redirectURL = $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString = false;
$WA_fieldNamesStr = "ProductID";
$WA_columnTypesStr = "',none,''";
$WA_fieldValuesStr = "".((isset($_POST["WADADeleteRecordID"]))?$_POST["WADADeleteRecordID"]:"") ."";
$WA_comparisonStr = "=";
$WA_fieldNames = explode("|", $WA_fieldNamesStr);
$WA_fieldValues = explode($WA_AB_Split, $WA_fieldValuesStr);
$WA_columns = explode("|", $WA_columnTypesStr);
$WA_comparisions = explode("|", $WA_comparisonStr);
$WA_connectionDB = $database_Conn_WebAssist;
mysql_select_db($WA_connectionDB, $WA_connection);
if (!session_id()) session_start();
$deleteParamsObj = WA_AB_generateWhereClause($WA_fieldNames, $WA_columns, $WA_fieldValues, $WA_comparisions);
$WA_Sql = "DELETE FROM `" . $WA_table . "` WHERE " . $deleteParamsObj->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);
}
}
?>
<?php
// RepeatSelectionCounter_1 Initialization
$RepeatSelectionCounter_1 = 0;
$RepeatSelectionCounterBasedLooping_1 = false;
$RepeatSelectionCounter_1_Iterations = "3";
?>
<!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>Untitled Document</title>
<script src="webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>

<link href="webassist/forms/fd_basic_default.css" rel="stylesheet" type="text/css">
<link href="webassist/forms/dataassist_button.css" rel="stylesheet" type="text/css" />
<style>

form.DetailsPage {
width: auto;
}
.WADAResults {
font-size:11px;
}
.WADAResultsNavigation {
border-width:1px;
border-style:solid;
border-color:#BABDC2;
padding-top:2px;
padding-right:2px;
padding-bottom:2px;
padding-left:2px;
}
.WADAResultsCount {
text-align:right;
float:right;
}
.WADAResultsNavTable td {}
#WADAResultsTable {
margin-top:5px;
margin-bottom:5px;
}
.WADAResultsEntry {
padding-bottom:5px;
}
.WADAResultTitle {
font-size:12px;
font-weight:bold;
}
.WADAResultDescription {
margin-top:2px;
}
.WADARecordNavigationButtons {
}
.WADAResultsBackTop {
clear:left;
}
.WADAResultsCountBottom {
text-align:right;
float:right;
}
.WADAResultsNavButtonCell, .WADAResultsInsertButton {
padding-top: 2px;
padding-right: 2px;
padding-bottom: 2px;
padding-left: 2px;
}
form .WADAResultsContainer input.formButton.ResultsNavButton {
padding: 2px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-khtml-border-radius: 6px;
border-radius: 6px;
outline:0;
}

form #WADAResultsTable input.formButton.ResultsPageButton {
margin: 2px;
padding: 0;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-khtml-border-radius: 6px;
border-radius: 6px;
outline:0;
}

.WADAResultsEntry {
text-align:center;

width:33%;
}
.black_overlay{
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.messageContainer {
display: none;
position: absolute;
top:0;
width: 100%;
z-index:1002;
text-align:center;
height:100%;
#position: relative;
overflow: hidden;
}
.messageWrapper {
#position: absolute;
#top: 50%;
display: table-cell;
vertical-align: middle;
}
.messageContent {
background-color:white;
display: inline-block;
padding: 16px;
border: 16px solid grey;
z-index:1002;
overflow: auto;
margin: auto;
#position: relative;
#top: -50%;
}
.WADAResultsTable th{
color: #000000;
background-color: #CCCCCC;
}
.WADAResultsTableWrapper {
clear: left;
border: 1px solid #CCCCCC;
}
.WADAResultsRowDark {
color:table;
background-color: #E5E5E5;
}
.formButton.ResultsPageButton.DetailButton {
background-repeat: no-repeat;
background-position: center center;
cursor:pointer;
width:29px;
height:29px;
background-image:url(images/Icons/view_details.png);
}

.formButton.ResultsPageButton.DeleteButton {
background-repeat: no-repeat;
background-position: center center;
cursor:pointer;
width:29px;
height:29px;
background-image:url(images/Icons/delete.png);
}
</style>
</head>

<body>
<div id="Results_Basic_Default_ProgressWrapper">
<form class="DetailsPage Basic_Default" id="Results_Basic_Default" name="Results_Basic_Default" method="post" action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">
<fieldset class="Basic_Default" id="Results">
<legend class="groupHeader">Results</legend>

<div class="WADAResultsContainer">
<a name="top"></a>
<?php if ($totalRows_WADAproducts > 0) { // Show if recordset not empty ?>
<div class="WADAResults">
<div class="WADAResultsNavigation">
<div class="WADAClearRight"></div>
<div id="WADAResultsNavTop">
<div class="WADAResultsCount">Records <?php echo ($startRow_WADAproducts + 1) ?> to <?php echo min($startRow_WADAproducts + $maxRows_WADAproducts, $totalRows_WADAproducts) ?> of <?php echo $totalRows_WADAproducts ?></div>
<table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
<tr valign="middle">
<td class="WADAResultsNavButtonCell" nowrap="nowrap"><?php if ($pageNum_WADAproducts > 0) { // Show if not first page ?><input type="button" value="<<" class="formButton ResultsNavButton unstyled" id="First" name="First" onclick="document.location.href='<?php printf("%s?pageNum_WADAproducts=%d%s", $currentPage, 0, $queryString_WADAproducts); ?>';" /><?php } // Show if not first page ?></td>
<td class="WADAResultsNavButtonCell" nowrap="nowrap"><?php if ($pageNum_WADAproducts > 0) { // Show if not first page ?><input type="button" value="<" class="formButton ResultsNavButton unstyled" id="Previous" name="Previous" onclick="document.location.href='<?php printf("%s?pageNum_WADAproducts=%d%s", $currentPage, max(0, $pageNum_WADAproducts - 1), $queryString_WADAproducts); ?>';" /><?php } // Show if not first page ?></td>
<td class="WADAResultsNavButtonCell" nowrap="nowrap"><?php if ($pageNum_WADAproducts < $totalPages_WADAproducts) { // Show if not last page ?><input type="button" value=">" class="formButton ResultsNavButton unstyled" id="Next" name="Next" onclick="document.location.href='<?php printf("%s?pageNum_WADAproducts=%d%s", $currentPage, min($totalPages_WADAproducts, $pageNum_WADAproducts + 1), $queryString_WADAproducts); ?>';" /><?php } // Show if not last page ?></td>
<td class="WADAResultsNavButtonCell" nowrap="nowrap"><?php if ($pageNum_WADAproducts < $totalPages_WADAproducts) { // Show if not last page ?><input type="button" value=">>" class="formButton ResultsNavButton unstyled" id="Last" name="Last" onclick="document.location.href='<?php printf("%s?pageNum_WADAproducts=%d%s", $currentPage, $totalPages_WADAproducts, $queryString_WADAproducts); ?>';" /><?php } // Show if not last page ?></td>
</tr>
</table>&nbsp;
</div>
<div class="WADAClearRight"></div>
</div>
<table id="WADAResultsTable" border="0" cellpadding="4" cellspacing="0" width="100%">
<?php do { ?>
<tr>
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_WADAproducts){
?>
<td class="WADAResultsEntry">
<div class="WADAResultThumbArea"><a href="products_detail.php?ProductID=<?php echo($row_WADAproducts['ProductID']); ?>" ><?php echo(isset($_GET["pageNum_WADAproducts"])?"&pageNum_WADAproducts=".intval($_GET["pageNum_WADAproducts"]):""); ?><img class="WADAResultThumb" border="0" src="images/products/<?php echo($row_WADAproducts['ProductThumb']); ?>" alt="<?php echo($row_WADAproducts['ProductShortDesc']); ?>" width="150"/></a></div>
<div class="WADAResultInfoArea">
<div class="WADAResultTitle"><a href="products_detail.php?ProductID=<?php echo($row_WADAproducts['ProductID']); ?>" ><?php echo(isset($_GET["pageNum_WADAproducts"])?"&pageNum_WADAproducts=".intval($_GET["pageNum_WADAproducts"]):""); ?>
<?php echo($row_WADAproducts['ProductName']); ?></a></div>
<div class="WADAResultDescription"><?php echo($row_WADAproducts['ProductShortDesc']); ?></div>
<div class="WADAResultCommerceArea">
<div class="WADAResultPrice"><?php echo($row_WADAproducts['ProductPrice']); ?></div>
<div class="WADAResultCommerceButton"><input type="submit" value="Add To Cart" class="formButton unstyled" id="unstyled" name="unstyled" /></div>
</div>
<div class="WADARecordNavigationButtons"><input type="button" class="formButton ResultsPageButton unstyled DetailButton" value="" onclick="document.location.href='products_detail.php?ProductID=<?php echo($row_WADAproducts['ProductID']); ?>
<?php echo(isset($_GET["pageNum_WADAproducts"])?"&pageNum_WADAproducts=".intval($_GET["pageNum_WADAproducts"]):""); ?>';"/><input type="button" class="formButton ResultsPageButton unstyled DeleteButton" value="" onclick="document.getElementById('WADADeleteRecordID').value=<?php echo($row_WADAproducts['ProductID']); ?>;document.getElementById('deleteBox').style.display = 'block';document.getElementById('deleteMessage').style.display = 'table';" /></div>
</div>
</td>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_WADAproducts && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_WADAproducts = mysql_fetch_assoc($WADAproducts);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
</tr>
<?php } while ($row_WADAproducts = mysql_fetch_assoc($WADAproducts)); ?>
</table>
<div class="WADAResultsNavigation">
<div class="WADAClearRight"></div>
<div id="WADAResultsNavBottom">
<div class="WADAResultsCountBottom">Records to <?php echo min($startRow_WADAproducts + $maxRows_WADAproducts, $totalRows_WADAproducts) ?> of <?php echo $totalRows_WADAproducts ?></div>
<table border="0" cellpadding="0" cellspacing="0" class="WADAResultsNavTable">
<tr valign="middle">
<td class="WADAResultsNavButtonCell" nowrap="nowrap"><?php if ($pageNum_WADAproducts > 0) { // Show if not first page ?><input type="button" value="<<" class="formButton ResultsNavButton unstyled" id="First_2" name="First_2" onclick="document.location.href='<?php printf("%s?pageNum_WADAproducts=%d%s", $currentPage, 0, $queryString_WADAproducts); ?>';" /><?php } // Show if not first page ?></td>
<td class="WADAResultsNavButtonCell" nowrap="nowrap"><?php if ($pageNum_WADAproducts > 0) { // Show if not first page ?><input type="button" value="<" class="formButton ResultsNavButton unstyled" id="Previous_2" name="Previous_2" onclick="document.location.href='<?php printf("%s?pageNum_WADAproducts=%d%s", $currentPage, max(0, $pageNum_WADAproducts - 1), $queryString_WADAproducts); ?>';" /><?php } // Show if not first page ?></td>
<td class="WADAResultsNavButtonCell" nowrap="nowrap"><?php if ($pageNum_WADAproducts < $totalPages_WADAproducts) { // Show if not last page ?><input type="button" value=">" class="formButton ResultsNavButton unstyled" id="Next_2" name="Next_2" onclick="document.location.href='<?php printf("%s?pageNum_WADAproducts=%d%s", $currentPage, min($totalPages_WADAproducts, $pageNum_WADAproducts + 1), $queryString_WADAproducts); ?>';" /><?php } // Show if not last page ?></td>
<td class="WADAResultsNavButtonCell" nowrap="nowrap"><?php if ($pageNum_WADAproducts < $totalPages_WADAproducts) { // Show if not last page ?><input type="button" value=">>" class="formButton ResultsNavButton unstyled" id="Last_2" name="Last_2" onclick="document.location.href='<?php printf("%s?pageNum_WADAproducts=%d%s", $currentPage, $totalPages_WADAproducts, $queryString_WADAproducts); ?>';" /><?php } // Show if not last page ?></td>
</tr>
</table>&nbsp;
</div>
<div class="WADAClearBoth"></div>
</div>
<div class="WADAResultsBackTop"><input type="button" value="Top" class="formButton unstyled" id="Top" name="Top" onclick="window.location.hash='top';" /></div>
<div class="black_overlay" id="deleteBox"></div>
<div class="messageContainer" id="deleteMessage">
<div class="messageWrapper">
<div class="messageContent">
This will permanently remove the record from your database.<br/>
This action cannot be undone.<br/><br/>
<input type="submit" value="Delete" class="formButton unstyled" id="Delete" name="Delete" />
<input type="button" value="Cancel" class="formButton unstyled" id="Cancel" name="Cancel" onclick="document.getElementById('deleteBox').style.display = 'none';document.getElementById('deleteMessage').style.display = 'none';" />
</div>
</div>
</div>
</div>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_WADAproducts == 0) { // Show if recordset empty ?>
<div class="WADANoResults">
<div class="WADANoResultsMessage">There are no results for your search. Please try again.</div>
</div>
<?php } // Show if recordset empty ?>
</div>

</fieldset>
<input type="hidden" name="WADADeleteRecordID" id="WADADeleteRecordID" value="<?php echo($row_WADAproducts["ProductID"]); ?>" />
</form></div><div id="Results_Basic_Default_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
<script type="text/javascript">
WADFP_SetProgressToForm('Results_Basic_Default', 'Results_Basic_Default_ProgressMessageWrapper', WADFP_Theme_Options['BigSpin:Slate']);
</script>
<div id="Results_Basic_Default_ProgressMessage" >
<p style="margin:10px; padding:5px;" ><img src="webassist/progress_bar/images/slate-largespin.gif" alt="" title="" style="vertical-align:middle;" />&nbsp;&nbsp;Please wait</p>
</div>
</div>


</body>
</html>
<?php
mysql_free_result($WADAproducts);
?>


--------------- PHP Page Ends ---------------------

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