Date: 11/15/00
- Next message: Paul Tuohy: "[PHP] counting matches with eregi()"
- Previous message: Ignacio Vazquez-Abrams: "Re: [PHP] mkdir question"
- In reply to: Hit Media: "[PHP] How 2 ANALYZE POPULAR SEARCH WORDS?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I just created a search tool against a mysql db to search two fields.
1) Only works in 3.23 mysql (new beta is pretty stable; no probs yet)
2) Only works against varchar and text field types
SELECT FIELD(s), MATCH (field_1,field_2,...field_n) AGAINST ('search
criteria') AS percentage FROM table;
now percentage is a decimal/float showing popularity against criteria.
-----Original Message-----
From: Hit Media [mailto:list <email protected>]
Sent: Wednesday, November 15, 2000 3:21 PM
To: php-general <email protected>
Subject: [PHP] How 2 ANALYZE POPULAR SEARCH WORDS?
Hey PHPeeps -
How would you analyze searched words to find/sort the most popular?
Every time someone types something into our search box, we save it in a
MySQL varchar field.
They usually type multiple words.
So... would you use a PHP loop to explode each varchar by " " into
individual trimmed words, lowercase them, and ADD to an
ARRAY? (searchwords[sex]++; searchwords[mp3]++; etc...)
Or is there a better way?
Any pre-made solutions to analyzing search box logs?
Thanks!
Derek Sivers
list <email protected>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Paul Tuohy: "[PHP] counting matches with eregi()"
- Previous message: Ignacio Vazquez-Abrams: "Re: [PHP] mkdir question"
- In reply to: Hit Media: "[PHP] How 2 ANALYZE POPULAR SEARCH WORDS?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

