Hmmmm, how about using full text indexing? It will be a lot easier
to implement and a lot quicker.
On Jul 12, 2005, at 1:09 PM, zzapper wrote:
Hi
I have a piece of code which will search a series of records for
the presence of two keywords $key1
and $key2 (see below)
The client now wants more keywords $key1,2,3,4 etc
But is there any alternative to mushrooming the the following
select???
$wherekeyword =<<<__SQL__
and
(
(
(synopsis like '%$key1%') or
(title like '%$key1%') or
(keywords like '%$key1%')
)
and
(
(synopsis like '%$key2%') or
(title like '%$key2%') or
(keywords like '%$key2%')
)
)
__SQL__;
}
--
zzapper
vim -c ":%s%s*%Cyrnfr)fcbafbe[Oenz(Zbbyranne%|:%s)[[()])-)Ig|norm Vg?"
http://www.rayninfo.co.uk/tips/ vim, zsh & success tips
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]