Searching part of a Database...

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

Searching part of a Database...

Post by Thunderstone »



In one of the postings I read that there is a way to do this - but it is
by modifying the search script. The question is - how do i do that??
Could you give me a simple step by step run-through of how i could for
example search only the pages under this directory only in the
www.this.com domain...
http://www.this.com/folder/
Thanks

-Paul



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

Searching part of a Database...

Post by Thunderstone »




Change the script to

<$myprefix= "www.this.com/folder/%">
<sql "select blah,blah,blah from html where Url matches $myprefix and ...">

Note "blah,blah,blah" is undocumented Texis syntax.




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

Searching part of a Database...

Post by Thunderstone »




OK but what function is this in... i dont see any variable named
$myprefix

-Paul
On Wed, 27 May 1998, Thunderstone - EPI wrote:




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

Searching part of a Database...

Post by Thunderstone »



$myprefix is an example of a variable you might set based on a user
selection from the search form.

The main query <sql> is in the "runquery" function. Modify those statements
to include the extra "Url matches $myprefix and" to the where clause.



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

Searching part of a Database...

Post by Thunderstone »

Post Reply