This topic is locked

Entering more than one item in a search field?

12/16/2008 4:16:40 PM
PHPRunner General questions
D
dblack6047 author

I recently purchased PHPRunner 5.0 and have created a search screen for my customers to look up operating system computer file names and their respective hash values (MD5 and SHA1 hash values) based on group file name extensions. For example I have a advanced search page that has four columns:
File_Name File_Name_Extension MD5_Hash SHA1_Hash
I want my customers who are searching for all known MD5 or SHA1 values of given file name extensions i.e. .jpg and .bmp, to be able to enter more than one file extension and receive all the information in my database on all .jpg and .bmp files including their MD5 and SHA1 hash values.
If thought that if I put in the search criteria field (without quotes) "jpg bmp" or comma delimited "jpg,bmp" it would search on both jpg and bmp. But I am finding that it will only search on one word at a time i.e. jpg or bmp.
Is there a way to enter multiple items in a single field so that it can search and bring into the "view screen" all occurences of jpg and bmp files?
I've searched the forums indepth and do not see any hints or suggestions from past discussions.
Any assistance would be greatly appreciated.
David

L
Lorenbond 12/16/2008

4.2(build379)

This is a very important topic for me as well.
I've seen some post that you can modify for searching a phrase but not multiple keywords.
A "HOW TO" topic would be appreciated by many I'm sure! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=36063&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />

J
Jane 12/17/2008

Hi,
modify generated ..._list.php file for this purpose.

Find this snippet there:

$strWhere = "1=0";

if($where=StrWhere("Field1", $strSearchFor, $strSearchOption, ""))

$strWhere .= " or ".$where;

if($where=StrWhere("Field2", $strSearchFor, $strSearchOption, ""))

$strWhere .= " or ".$where;

if($where=StrWhere("Field3", $strSearchFor, $strSearchOption, ""))

$strWhere .= " or ".$where;

.....



and replace it with your custom where clause.

L
Lorenbond 12/17/2008