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

Search for exact whole word within a string of words

Thread began 10/21/2020 4:07 pm by TroyD | Last modified 10/27/2020 2:01 pm by TroyD | 274 views | 9 replies



I spoke too soon and found that there is still one issue. It does a good job finding the names in a group of names but records are also returned that have that searched name within a sub string.

Using my list of example names again, it finds the "Alan" but it also returns "Alana". It's the third search I think where includes seems to find the "Alan" within "Alana" even though I have a blank space before and after the compared post value. Can you see anything I'm missing?

Currently this is what the search behavior looks like:

$searchrsNameList_1 = new WA_MySQLi_Search("rsNameList","0=1");

if ((((isset($_POST["name_search"]))?$_POST["name_search"]:"") != "")) {
  $searchrsNameList_1->setSearch(array("type"=>"Key", "comparison"=>"Begins With", "join"=>"OR", "and"=>", ", "or"=>" ", "start_encap"=>"\"", "end_encap"=>"\""), array("name"), "s", "".((isset($_POST["name_search"]))?$_POST["name_search"]." ":"")  ."");
  $searchrsNameList_1->setSearch(array("type"=>"Key", "comparison"=>"Ends With", "join"=>"OR", "and"=>", ", "or"=>" ", "start_encap"=>"\"", "end_encap"=>"\""), array("name"), "s", "".((isset($_POST["name_search"]))?" ".$_POST["name_search"]:"")  ."");
  $searchrsNameList_1->setSearch(array("type"=>"Key", "comparison"=>"Includes", "join"=>"OR", "and"=>", ", "or"=>" ", "start_encap"=>"\"", "end_encap"=>"\""), array("name"), "s", "".((isset($_POST["name_search"]))?" ".$_POST["name_search"]." ":"")  ."");


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





Ease of use


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