Restricting by host (machine) name.

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Restricting by host (machine) name.

Post by Thunderstone »



I have indexed www.foo.com and www2.foo.com into a
single database. Is there a special query that I
can send to only find results with a url that begins
with 'www2' and not 'www'?

____________________________________________________________
Better than free email: shared calendar, files, and more...
Get your 'What-U-Seek Briefcase' at http://www.whatuseek.com






User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Restricting by host (machine) name.

Post by Thunderstone »



Add a matches clause to the existing <sql> in the search function:

<sql ... "select ... where ... and Url matches 'www2.foo.com%'">

Or use a variable ($uq for example) that you can set based on user input:

<$uq='www2.foo.com%'>
...
<sql ... "select ... where ... and Url matches $uq">



Post Reply