close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search results cache in browser

Thread began 9/11/2010 11:06 am by biz295654 | Last modified 9/12/2010 7:54 am by biz295654 | 534 views | 3 replies |

biz295654

Search results cache in browser

Encountered an issue with DA Search and Results pages. (This happened on another site some time ago, but I didn't pursue finding a solution as that site wasn't critical.)

Using DA to create Results, Insert, Delete, Update, and Search.

Example of use, problem: Use the search page to get a result of one or two records. All good.

Then use a link to the Results page for review, and the search parameters, ie, the one or two records from the search, are the only ones that show. Only solution is to close down the browser, restart or flip to another browser. Can duplicate in Safari and Firefox and Chrome (mac).

Any ideas on how to fix?

Thanks.

Sign in to reply to this post

biz295654

One temporary fix found: Do a new search and don't enter anything into any field. It clears out cache. But clients shouldn't have to do this step. There must be a fix somewhere. Any and all suggestions welcome. Thanks.

Sign in to reply to this post

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.

Sign in to reply to this post

biz295654

Thank you! I'll give it a try.

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