Quantcast
Channel: ASPRunner forums
Viewing all articles
Browse latest Browse all 2586

Limiting the search

$
0
0
Hello!

I have a simple contact book at work. Simple search by the name and phone number. To prevent showing all records I added in List page: Before SQL query this conditional code:

if ( strlen($_REQUEST["qs"]) < 3 && !$_REQUEST["goto"] || strpos($_REQUEST["qs"], ' ') !== false )
	$strWhereClause = whereAdd( $strWhereClause, "1=0" );


You must enter at least three characters and no spaces to get the search result. But... All phone numbers start with the same digits, let's say 333 xxx xxx. By entering the initial digits you can get a list of all people. I would like to limit the search - not to search the first digits but the last four digits.

How can I do this?


Robert Drygas

Viewing all articles
Browse latest Browse all 2586

Trending Articles