close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Search results cache in browser

Thread began 9/11/2010 8:06 am by biz295654 | Last modified 9/12/2010 4:54 am by biz295654 | 1053 views | 3 replies

Dave BuchholzBeta Tester

This because the search criteria are store in a session variable look for this code in your page

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



what is happening is that the code is checking for the presence of the session variable and the including the contents in the where clause of the recordset

What I do is include a check for the "search button" like so

//save the query in a session variable
if ((isset($_GET["WADbSearch1"])) && ($_GET["WADbSearch1"] != "")) {
$_SESSION["WADbSearch1_*SESSION_NAME*"]=$WADbSearch1->whereClause;
}
}
else {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//get the filter definition from a session variable
if ((isset($_GET["WADbSearch1"])) && ($_GET["WADbSearch1"] != "")) { // button check
if (isset($_SESSION["WADbSearch1_tbl_*SESSION_NAME*"]) && $_SESSION["WADbSearch1_tbl_categories"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_*SESSION_NAME*"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';



this ensures the search code is only processed if the search button is pressed, be warned though this mod will mean that the DA Search code will no longer appear in your server behaviours panel and you will have to remove it if you want to edit it.

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