Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Re: top 5 search terms

Quote Reply
Re: top 5 search terms In reply to
Wow.... I did the same thing by editing out "sex" words.

The fix is ugly... <G> I've thought of a better way, but never did it:

Code:
my $results = $search->prepare (" SELECT *
FROM Search_Log_Daily
Where Term NOT RLIKE 'sex' AND Term NOT LIKE '%porn%'
ORDER BY Count DESC
LIMIT 11 ");
Just add, an:

AND Term NOT LIKE '%http:%' to the string.

You can also do something like this, that may be over all better:

AND Char_Length(Term) > 12

There are 11 characters in http://www.

If someone is trying to get around that, you can probably also eliminate any string with a '.'

Since that is a reserved character, I'm not sure how that would work exactly, but

AND Term NOT LIKE '%\.%'

Might do it.

Any ONE of the above is a reasonable solution. More than that is unnecessary.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Subject Author Views Date
Thread top 5 search terms pugdog 6410 Apr 14, 2000, 10:15 AM
Post Re: top 5 search terms
pugdog 6349 Apr 14, 2000, 11:33 PM
Post Re: top 5 search terms
Elijanio 6332 Apr 15, 2000, 3:34 PM
Post Re: top 5 search terms
pugdog 6317 Apr 15, 2000, 4:39 PM
Post Re: top 5 search terms
Elijanio 6340 Apr 15, 2000, 5:07 PM
Post Re: top 5 search terms
pugdog 6339 Apr 15, 2000, 5:42 PM
Post Re: top 5 search terms
Elijanio 6360 Apr 15, 2000, 5:51 PM
Post Re: top 5 search terms
pugdog 6331 Apr 15, 2000, 7:54 PM
Post Re: top 5 search terms
Elijanio 6366 Apr 16, 2000, 6:26 AM
Thread Re: top 5 search terms
pugdog 6345 Apr 16, 2000, 7:03 AM
Thread Re: top 5 search terms
Christa 6328 Nov 9, 2000, 12:46 PM
Thread Re: top 5 search terms
pugdog 6298 Nov 9, 2000, 1:30 PM
Thread Re: top 5 search terms
Christa 6292 Nov 9, 2000, 1:52 PM
Thread Re: top 5 search terms
pugdog 6325 Nov 9, 2000, 3:12 PM
Thread Re: top 5 search terms
Christa 6331 Nov 9, 2000, 3:24 PM
Thread Re: top 5 search terms
pugdog 6328 Nov 9, 2000, 6:06 PM
Thread Re: top 5 search terms
Christa 6308 Nov 9, 2000, 7:27 PM
Thread Re: top 5 search terms
pugdog 6279 Nov 9, 2000, 7:31 PM
Thread Re: top 5 search terms
OneDanShow 6311 Nov 9, 2000, 10:27 PM
Thread Re: top 5 search terms
pugdog 6289 Nov 9, 2000, 11:01 PM
Post Re: top 5 search terms
pirl 6257 Nov 10, 2000, 3:27 AM