close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Getting started problem

Thread began 4/02/2013 8:36 am by Ness_Rob446867 | Last modified 4/03/2013 12:30 pm by Jason Byrnes | 489 views | 3 replies |

Ness_Rob446867

Getting started problem

Hi All,

I have just brought Data Bridge and i am also new to dreamweaver and im trying to insert a search box on my website. Ive created an account and a table with MYSQL through my server host, i then tried to insert DataAssist search wizard to my php page in dreamweaver but it keeps telling me i need to create a recordset first, so i tried to create a recordset but for some reason dreamweaver wont connect to my MYSQL database. The attached box appears. Where am i going wrong?

Sign in to reply to this post

Jason ByrnesWebAssist

This error points to a problem with the Site definition settings for connecting to the testing server.

Make sure your Dreamweaver site definition is properly configured to connect to the remote host in the testing server settings. Also, make sure you have the correct address for the site in the Web URL setting.

Sign in to reply to this post

Ness_Rob446867

New problem

Ok so ive sorted that connection problem out and this is where ive got to and what i want to achieve.

The website is a funeral directors and i need to create a donations page with a search box so that donors can enter the deceased name and as a result a name (or names similar to what has been entered) will appear. Next to the name will be a URL. Each deceased person(s) will have a unique URL, donation payments wont actually be taken on this website, the URL will link them to a different donations page for that individual on another website, the link will redirect them to that website (hopefully all that makes sense!).

Ive setup MAMP on my computer, created a table for database information in phpmyadmin, connected deamweaver to that database with a recordset, created a DataAssist Search Wizard php page which automatically inserts the form on my donations.html page (please see attached donations.html and ive pasted search.php below)


But i am now stuck as to what to do next. Will the results appear on this page or do i need to create a html page for results to appear on and a new php page for results? I am confused as to what i need to do?

Any help REALLY 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 the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch2_search"]=$WADbSearch2->whereClause;
}
}
else {
$WADbSearch2 = new FilterDef;
$WADbSearch2->initializeQueryBuilder("MYSQL","1");
//get the filter definition from a 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 FROM donation WHERE name = 'name' ORDER BY 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);
?>

Sign in to reply to this post

Jason ByrnesWebAssist

when using the data base search wizard, you need to first create a recordset, and add the code to display the information on the results page, a simple way to do this is to add a dynamic table.

go to Insert -> Data Objects -> Dynamic Data -> Dynamic Table.

with the recordset and the dynamic table in place on the results page, you can then run the data assist search wizard to create the search form and add the search to the results page.


you may find it easier to use the Data Crate pages wizard instead, and have it create the search and results pages for you.

Sign in to reply to this post

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