close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search results displays all records

Thread began 12/28/2010 9:48 am by windsoarer388279 | Last modified 12/28/2010 12:47 pm by windsoarer388279 | 2092 views | 8 replies |

windsoarer388279

Search results displays all records

Hello all,

I've been working on a search and results page for some time now. I used data assist to create the admin back end of a photo gallery system.

My trouble is, by using the data search behavior I only display all records from within my database.

I'm fairly confident that the problem is with the value that I'm trying to use for the filter in the search parameter setup.

Attached are my search and results pages.

Thanks for any help.

Attached Files
aginsigns.zip
Sign in to reply to this post

Ray BorduinWebAssist

Instead of using server values like:

$_GET[S_subCategory]

you should be entering them like:

<?php echo($_GET['S_subCategory']); ?>

Sign in to reply to this post
Did this help? Tips are appreciated...

windsoarer388279

Yeah, I had something similar to that before, by using the lightning bolt and selecting the form fields.

But, neither of those worked.

I do know that if I setup the recordset with the same filters it works, but I was looking for a more "guided" setup. Also I'm not sure how to search text with using the advanced recordset setup.

Again thanks for the help.

Sign in to reply to this post

Ray BorduinWebAssist

Can I see an updated zip of the pages with the correct syntax as I suggested. I can take a look and see what else might be wrong.

Sign in to reply to this post
Did this help? Tips are appreciated...

windsoarer388279

Here are the updated files.

I see it added the "()" around my variables, not sure if that helps.

Attached Files
aginsigns.zip
Sign in to reply to this post

Ray BorduinWebAssist

The results page still isn't updated.

The code:

//comparison list additions
$WADbSearch1->addComparison("subCategory","$_GET[S_subCategory]","AND","=",1);
$WADbSearch1->addComparison("favorite","$_GET[S_favorite]","AND",">=",1);
$WADbSearch1->keywordComparison($KeyArr1,"$_GET[S_department_name]","AND","Includes",",%20","%20","%22","%22",0);



will become:

//comparison list additions
$WADbSearch1->addComparison("subCategory","". $_GET['S_subCategory']. "","AND","=",1);
$WADbSearch1->addComparison("favorite","". $_GET['S_favorite']. "","AND",">=",1);
$WADbSearch1->keywordComparison($KeyArr1,"". $_GET['S_department_name']. "","AND","Includes",",%20","%20","%22","%22",0);
Sign in to reply to this post
Did this help? Tips are appreciated...

windsoarer388279

I don't know why it wasn't updated.

I attached the files again in a new name.

I also tried hand coding the filter as you posted with the same results, and I also changed the subCategory value to the form field selection as a trial. Again all with the same result, all records are displayed.

Attached Files
aginsignsUpdate.zip
Sign in to reply to this post

Ray BorduinWebAssist

The search is never running since you are using a form method="get" and have your trigger set to $_POST.

Try updating your trigger code from:

if (isset($_POST["Search_x"])) {

to:

if (isset($_GET["Search_x"])) {

Sign in to reply to this post
Did this help? Tips are appreciated...

windsoarer388279

Well that did it.

I knew it was using GET but when using DataAssist there is no way to change that setting, I had to hand code it. Could that be a bug? Maybe have the choice of POST or GET?

Thank you for your help, I always get fast and accurate help.

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