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 6100 Apr 14, 2000, 10:15 AM
Post Re: top 5 search terms
pugdog 6048 Apr 14, 2000, 11:33 PM
Post Re: top 5 search terms
Elijanio 6031 Apr 15, 2000, 3:34 PM
Post Re: top 5 search terms
pugdog 6016 Apr 15, 2000, 4:39 PM
Post Re: top 5 search terms
Elijanio 6039 Apr 15, 2000, 5:07 PM
Post Re: top 5 search terms
pugdog 6037 Apr 15, 2000, 5:42 PM
Post Re: top 5 search terms
Elijanio 6057 Apr 15, 2000, 5:51 PM
Post Re: top 5 search terms
pugdog 6029 Apr 15, 2000, 7:54 PM
Post Re: top 5 search terms
Elijanio 6065 Apr 16, 2000, 6:26 AM
Thread Re: top 5 search terms
pugdog 6042 Apr 16, 2000, 7:03 AM
Thread Re: top 5 search terms
Christa 6026 Nov 9, 2000, 12:46 PM
Thread Re: top 5 search terms
pugdog 5995 Nov 9, 2000, 1:30 PM
Thread Re: top 5 search terms
Christa 5989 Nov 9, 2000, 1:52 PM
Thread Re: top 5 search terms
pugdog 6023 Nov 9, 2000, 3:12 PM
Thread Re: top 5 search terms
Christa 6028 Nov 9, 2000, 3:24 PM
Thread Re: top 5 search terms
pugdog 6026 Nov 9, 2000, 6:06 PM
Thread Re: top 5 search terms
Christa 6005 Nov 9, 2000, 7:27 PM
Thread Re: top 5 search terms
pugdog 5976 Nov 9, 2000, 7:31 PM
Thread Re: top 5 search terms
OneDanShow 6008 Nov 9, 2000, 10:27 PM
Thread Re: top 5 search terms
pugdog 5986 Nov 9, 2000, 11:01 PM
Post Re: top 5 search terms
pirl 5956 Nov 10, 2000, 3:27 AM