close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Price range search

Thread began 10/23/2009 9:37 am by maurizio.melandri390100 | Last modified 10/28/2009 11:48 am by maurizio.melandri390100 | 3828 views | 7 replies

maurizio.melandri390100

Originally Said By: Eric Mittman
  Setting this up correctly in DataAssist Search you will need to have two criteria. One for the start and one for the end. For the first criteria you will select the price column, then for the type select Number, then for the comparison you will select less than. Finally for the type choose value, and for the value use the lightning bolt to select your min price field.

For the max price you would do the same thing but choose greater than for the comparison and select the max price input for the value.

What are the steps you have taken and what is the result you are getting?  



I open the page of results. I run search wizard and select the search page and the search form. I add the "range of price" and select "or". I select the column of price in the table and 2 fileds (text field) from form (minimum and maximum).

When try in IE i have this error:

Fatal error: Class 'FilterDef' not found in C:\xampp\htdocs\www\doctorhousepc\lista-prodotti-cercati.php on line 10

The page lista-prodotti-cercati from line 1 thru line 87:

<?php require_once('Connections/schede.php'); ?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: WADAdhpc_prodotti;
//Searchpage: search.php;
//Form: WADASearchForm;
$WADbSearch2_DefaultWhere = "";
if (!session_id()) session_start();
if ((isset($_GET["WADbSearch2"])) && ($_GET["WADbSearch2"] != "")) {
$WADbSearch2 = new FilterDef;
$WADbSearch2->initializeQueryBuilder("MYSQL","1");
//keyword array declarations

//comparison list additions
$WADbSearch2->addComparison("dhpc_Prezzo","".WADS_stripCurrency($_POST["S_dhpc_Prezzo"]) ."","OR",">=",1);
$WADbSearch2->addComparison("dhpc_Prezzo","".WADS_stripCurrency($_POST["S_dhpc_Prezzo2"]) ."","AND","<=",1);

//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch2_listaprodotticercati"]=$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_listaprodotticercati"]) && $_SESSION["WADbSearch2_listaprodotticercati"] != "") {
$WADbSearch2->whereClause = $_SESSION["WADbSearch2_listaprodotticercati"];
}
else {
$WADbSearch2->whereClause = $WADbSearch2_DefaultWhere;
}
}
else {
$WADbSearch2->whereClause = $WADbSearch2_DefaultWhere;
}
}
$WADbSearch2->whereClause = str_replace("\\''", "''", $WADbSearch2->whereClause);
$WADbSearch2whereClause = '';
?>
<?php
//WA Database Search Include
require_once("WADbSearch/HelperPHP.php");
?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: WADAdhpc_prodotti;
//Searchpage: search.php;
//Form: WADASearchForm;
$WADbSearch1_DefaultWhere = "";
if (!session_id()) session_start();
if ((isset($_GET["Search_x"]) && $_GET["Search_x"] != "")) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations

//comparison list additions
$WADbSearch1->addComparisonFromList("DHPC_Descrizione_tipo","S_DHPC_Descrizione_tipo","AND","=",0);
$WADbSearch1->addComparisonFromEdit("dhpc_Marca","S_dhpc_Marca","AND","Includes",0);
$WADbSearch1->addComparisonFromEdit("dhpc_Sigla","S_dhpc_Sigla","AND","Includes",0);
$WADbSearch1->addComparisonFromEdit("dhpc_Prezzo","S_dhpc_Prezzo","AND","<=",1);
$WADbSearch1->addComparisonFromEdit("dhpc_Prezzo","S_dhpc_Prezzo","AND",">=",1);

//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_listaprodotticercati"]=$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_listaprodotticercati"]) && $_SESSION["WADbSearch1_listaprodotticercati"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_listaprodotticercati"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';

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