close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Show All Results Button

Thread began 11/01/2010 12:56 pm by eaefaw380137 | Last modified 11/01/2010 3:04 pm by Jason Byrnes | 962 views | 7 replies |

eaefaw380137

Show All Results Button

Before you send me off to all of the other posts within the forum for this topic, I must let you know that I have researched (and tried unsuccessfully) to implement most of these solutions.

I believe that my problem results from the order in which I created my files. Below are the steps that I used.

1.Used Data Assist Wizard to create all files (except email_search.php and email_insert.php) for data that is stored in a MySQL database of emails that are entered into the contact form. The data collection works as expected.

2. I then decided to add search capabilities and used Data Assist Search Wizard. Everything is working as expected all the way from search, results, update, edit, delete functionality. Perfect!

MY PROBLEM: I cannot figure out how to just "Show All" records. The only time it works is when I first navigate to the email_results.php page prior to entering any search criteria. After that, navigating to email_results.php page (either via link or manually) returns the previous search results.

I tried the following Solutions:

1. I am sure it has something to do with the session variables on the email_results.php page and I saw on one post that this could be removed but then the pagination option would be lost. I do not want that.

2. I also saw the option for changing the default WHERE Clause to 0=0 in the Data Assist Search Behavior of the email_results.php page but that did not work.

3. There was also a solution for adding a link on the email_results.php page like this
<a href="email_Results.php?Search_x=0" target="_top">Show All</a> but that did not work. I presume it is because my trigger in the Data Assist Search Behavior looks like this
isset($_POST["WADbSearch2"])) && ($_POST["WADbSearch2"] I even tried replacing Search_x=0 to WADBSearch2=0 in the link above.

I am hoping to find a simple solution without having to recreate all of my pages as I have all of the other functionality of the pages working correctly.

Thanks in advance for your help.

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of your page so i can find the right solution for you.

Sign in to reply to this post

eaefaw380137

Show All Results Button - Files Attached

Jason,
As always thanks for your timely response. I have attached the search and results pages in .txt format for your review. Let me know if you need them in another format.

Attached Files
email_Results.txt
email_searchform.txt
Sign in to reply to this post

Jason ByrnesWebAssist

ok, on the results page, create the following link:

php:
<a href="email_Results.php?show=all">Show All</a>



then add this code at line 1:

php:
<?php

if(!session_id()) session_start();
if(isset(
$_GET['show']) && $_GET['show'] == "all") {
    unset(
$_SESSION["WADbSearch2_email_Results"]);
}
?>
Sign in to reply to this post

eaefaw380137

Jason My Man!!!!

Again you save the day!!! That worked perfectly.

If it is easy enough to explain, why was I encountering that issue? Was it the way/order I created my pages? I presume so, since there was a different trigger in my WA Search Behavior. I would like to know so that I can avoid this issue in the future.

Thanks again.

Sign in to reply to this post

Jason ByrnesWebAssist

No, it's not the order the pages where created.

for pagination to work properly, the search criteria are stored in a session. For this page, the session is:
$_SESSION["WADbSearch2_email_Results"]


the code i gave you just uses a querystring var to trigger unsetting that session:
if(isset($_GET['show']) && $_GET['show'] == "all") {
unset($_SESSION["WADbSearch2_email_Results"]);
}

Sign in to reply to this post

eaefaw380137

Got it. I will be saving that code to my Snippely Air Application. I am sure it will come in handy down the road. Thanks a million!

Sign in to reply to this post

Jason ByrnesWebAssist

the only thing you will need to change is the name of the ssession to unset.


look for this code on the results page to determine the session name:

php:
//save the query in a session variable

  if (1 == 1) {
    $_SESSION["WADbSearch2_email_Results"]=$WADbSearch2->whereClause;
  }



so you can find what tot change it to.

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