[thelist] Re: quick php/mysql search engine question

Dunstan Orchard dunstan at 1976design.com
Fri Sep 13 04:53:01 CDT 2002


> "SELECT * FROM $table WHERE keyword LIKE '%$keyword%'"

excellent, thanks very much for that :o)


> Of course, this also creates a problem where if your keyword contains
> entirely the word you're searching for, it will also turn up. For
> example, if your keyword is "discontinued" and someone searches for
> "con" you will still get this record.

oh yes... well I'll live with that for now, it might have its benefits as well
(eg. plane, airplane).


> You may want to normalize your tables a little more, by creating
> another table that links your data to its keywords:

actually I won't because the keywords aren't part of a set that apply to many
images - they're completely dependent on what the photo contains.

But thankyou for the suggestion, I will be using that idea for other areas,
such as categorizing the images into the country they were taken in and the
category (nature, people, etc) they fall into.

Thanks for the advice!

cheers - dunstan

---------------------------
Dorset, England
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/



More information about the thelist mailing list