Need help with Data Bridge/DataAssist!!
hi all,
so ive brought data bridge need create search box on website developing. have limited knowledge of dreamweaver , advised purchase data bridge in order me create search box. webpage -
the website funeral directors , need create donations page search box donors can enter deceased name , result name (or names similar has been entered) appear. next name url. each deceased person(s) have unique url, donation payments wont taken on website, url link them different donations page individual on website, link redirect them website (hopefully makes sense!).
ive setup mamp on computer, created table database information in phpmyadmin, connected deamweaver database recordset, created dataassist search wizard php page automatically inserts form on donations.html page (please see below - donations.html , php)
but stuck next. results appear on page or need create html page results appear on , new php page results? confused need do?
any appreciated!!
<?php require_once('connections/milesdata.php'); ?>
<?php require_once("webassist/database_management/wada_search.php"); ?>
<?php
//wa database search (copyright 2005, webassist.com)
//recordset: milesdata;
//searchpage: donations.html;
//form: form1;
$wadbsearch2_defaultwhere = "";
if (!session_id()) session_start();
if ((isset($_post["wadbsearch2"])) && ($_post["wadbsearch2"] != "")) {
$wadbsearch2 = new filterdef;
$wadbsearch2->initializequerybuilder("mysql","1");
//keyword array declarations
$keyarr0 = array("name");
//comparison list additions
$wadbsearch2->keywordcomparison($keyarr0,"".((isset($_post["name"]))?$_post["name"]:"") ."","and","includes",",%20","%20","%22","%22",0);
//save query in session variable
if (1 == 1) {
$_session["wadbsearch2_search"]=$wadbsearch2->whereclause;
}
}
else {
$wadbsearch2 = new filterdef;
$wadbsearch2->initializequerybuilder("mysql","1");
//get filter definition session variable
if (1 == 1) {
if (isset($_session["wadbsearch2_search"]) && $_session["wadbsearch2_search"] != "") {
$wadbsearch2->whereclause = $_session["wadbsearch2_search"];
}
else {
$wadbsearch2->whereclause = $wadbsearch2_defaultwhere;
}
}
else {
$wadbsearch2->whereclause = $wadbsearch2_defaultwhere;
}
}
$wadbsearch2->whereclause = str_replace("\\''", "''", $wadbsearch2->whereclause);
$wadbsearch2whereclause = '';
?>
<?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_milesdata, $milesdata);
$query_milesdata = "select url donation name = 'name' order name asc";
setquerybuildersource($query_milesdata,$wadbsearch2,false);
$milesdata = mysql_query($query_milesdata, $milesdata) or die(mysql_error());
$row_milesdata = mysql_fetch_assoc($milesdata);
$totalrows_milesdata = mysql_num_rows($milesdata);
?>
<?php
mysql_free_result($milesdata);
?>
come post on webassist forum! either tech support or our community members use data bridge on daily basis can assist there! http://www.webassist.com/support
More discussions in Dreamweaver extensions
adobe
Comments
Post a Comment