close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

editing search

Thread began 4/01/2011 4:47 pm by turk361661 | Last modified 4/11/2011 11:36 am by Jason Byrnes | 1154 views | 9 replies |

turk361661

editing search

Editing a Search.

I have a Search Page that has 3 search box fields for searches by Name, Common Name, and Category. I want modify the Search so that it is only one Search box field. Using this single search box users can type in a the name or common name and it will search both columns in my database. (I'm removing Category all together).

Any advice on modifying?
Is there a way I can open and edit the Search with DataAssist. (I created it with DataAssist)?

Also, my code is attached for reference.

Thanks,
Danielle

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

Jason ByrnesWebAssist

to edit the search criteria, double click the DataAssist search server behavior on the results page.

remove the criteria you no longer need and edit the Name Criteria. the columns section is a multi select list, select all of the columns you want to search against.

Sign in to reply to this post

turk361661

I'm still missing something.
See code attached for search (I removed the additional fields) and Results (I updated the server behavior).

The Results page server behavior now includes the ProductName and ProductCartDesc columns. I had to choose the type as "keywords" because I now have two columns selected.

When I try to search. The Results page shows all products listed in my database.
It should show only close matches (does not have to be exact).
Something is off. See code attached.

thanks for your help,
Danielle

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

Jason ByrnesWebAssist

on the results page, change:

php:
$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_POST["S_ProductName"]))?$_POST["S_ProductName"]:"")  ."","OR","Includes","%20AND%20","%20OR%20","%22","%22",0);




to:

php:
$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_GET["S_ProductName"]))?$_GET["S_ProductName"]:"")  ."","OR","Includes","%20AND%20","%20OR%20","%22","%22",0);
Sign in to reply to this post

turk361661

Hi Jason,

I made the change. It is still pulling all products in the database.
See code attached.

Thanks for the help,
Danielle

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

Jason ByrnesWebAssist

the recordset code on your page is duplicated. delete lines 109 - 113

php:
mysql_select_db($database_connNCP, $connNCP);

$query_WADAproducts = "SELECT ProductID, ProductLight, ProductName, ProductPrice, ProductWeight, ProductCartDesc, ProductShortDesc, ProductLongDesc, ProductThumb, ProductImage, ProductCategoryID, ProductUpdateDate, ProductNew, productMoist, productWood, productDeer, ProductLive, ProductUnlimited, ProductLocation, ProductsEnvironmentID FROM products ORDER BY ProductName ASC";
$query_limit_WADAproducts = sprintf("%s LIMIT %d, %d", $query_WADAproducts, $startRow_WADAproducts, $maxRows_WADAproducts);
$WADAproducts = mysql_query($query_limit_WADAproducts, $connNCP) or die(mysql_error());
$row_WADAproducts = mysql_fetch_assoc($WADAproducts);
Sign in to reply to this post

turk361661

Hi Jason,

That fixed it!
One more question.What option would I choose to have the results page include "close" matches.
For example. A user misspells a product name, say "LILLIUM", in the search box.
This will return zero products because of the misspelling of the name (The correctl spelling is "LILIUM")
Is there a selection I can make so that "close" matches show up on the results page?

Thanks for the help,
Danielle

Sign in to reply to this post

Jason ByrnesWebAssist

No, the SQL Query language does not offer support for the type of close matches you are describing.

Sign in to reply to this post

turk361661

This post has been deleted.

turk361661

Hi Jason,

Regarding my message back on the 4th, That fixed it.
It is working well with the exception of IE8 running on a PC (Windows Vista or older).
Any idea why IE8 would pull search results differently. This makes no sense to me.
Code and links attached.

Example:
go to link in text file. In the search box, enter
fern
Click Search.
In fireFox it shows 18 results containing fern.
In IE8 it shows 679 results (pull everything in the database).

Thanks for the help,
Danielle

Attached Files
searchEditrev5.zip
Sign in to reply to this post
loading

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