[thelist] Complex Search using PHP/MySQL

Matt Warden mwarden at gmail.com
Mon Oct 24 10:59:06 CDT 2005


Tim,

On 10/24/05, Tim Massey <Tim.Massey at itrm.co.uk> wrote:
> My question is - how would you go about filtering the results, using PHP
> or rely more on sql?

Thou shalt not do in PHP what can be accomplished in SQL.

Trust me. No matter how elegant your PHP solution is, it will not be
as elegant as what the database would do. Year and years of research
has gone into what the database would do.

Not only that, but it's thousands of times more maintainable, since
SQL is a declarative language.

> I'm thinking to do an initial search on the fields within the candidates
> table, generating an array of possible id's then filtering from the
> lookup tables to get a reduced array of id's then performing the Boolean
> search on the CV's for only those id's in the array.

Here is what you want:
http://www.google.com/search?q=mysql%20full%20text%20search

If you have more questions, feel free to ask. I (as well as many
others on this list) have done this sort of thing before.

--
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.



More information about the thelist mailing list