Hello Aaron, I believe all you would have to do is the following:
1. SELECT * FROM advert WHERE description REGEXP 'golf' AND description REGEXP 'gti';
I don't know if this is tidy enough, but you can keep adding AND qualifiers to the query string for each field. I have to admit, I'm quite new to SQL myself so there may be much better ways to do this:
2. SELECT * FROM advert WHERE description REGEXP 'golf' AND description REGEXP 'gti' AND field1 REGEXP 'exp1' AND fieldN REGEXP 'expN';
I should also mention I'm using MySQL 4.0.15 if that's relevant.
Hope this helps.
|