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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Help with WADbSearch results

Thread began 11/23/2015 11:21 am by info364504 | Last modified 11/25/2015 1:35 pm by Ray Borduin | 446 views | 10 replies |

info364504

Help with WADbSearch results

Hi, it works fine with one word searches but it doesn't with a full sentence. Example:
I do a search for Oil and it shows me a list of products with the word Oil in the title, but when I search for Oil vr100 it still shows all the results unless I use "".
All searches are also case sensitive, please help. Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

Is there a url where I can test the search functionality? What version of DataAssist are you using?

Case sensitivity is controlled by the data type of the columns you are searching. You can update your collation settings for the column to use either a case sensitive or case insensitive collation. For instance "latin1_general_ci" or "latin1_general_cs".... the cs or ci at the end stand for case sensitive or case insensitive.

Sign in to reply to this post

info364504

Thanks, I have fixed the case sensitive problem now.
I now have a different problem: when I search for example for oil xd30 I get the rright results, but when I searh for oil 30 (leaving the xd out) I don't get any results. It's like it only finds exact matches?.
Sorry this code is not online for you to test. Thanks

Sign in to reply to this post

Ray BorduinWebAssist

It looks like it should work.

What does the final where clause look like? You can write it to your page with:

php:
<?php echo($WADbSearch1->whereClause); ?>
Sign in to reply to this post

info364504

AND ((producto_titulo_esp LIKE '%oil%') OR (producto_titulo_eng LIKE '%oil%'))

Sign in to reply to this post

Ray BorduinWebAssist

That should return any rows with oil anywhere in the column and wouldn't require an exact match. Is there a url where I can test the page?

Sign in to reply to this post

info364504

yes it does return that.
But the pblem happens when for example I do a search for "oil ultra" and it returns no results eveh though I have items named "oil 4 stroke ultra"

Sign in to reply to this post

Ray BorduinWebAssist

Use:

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

Sign in to reply to this post

info364504

hanks, that kind of works but not 100%.
This shows all results containing oil and ultra not just the ones only containing those 2 words.

Sign in to reply to this post

Ray BorduinWebAssist

Try this:

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

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