in reply to regex search

I'm not familiar with using regexp's in SQL, but could you not join all the keywords into one regex? Ie, instead of doing
foreach $keyword ( @keywords ) { $sql_stmt .= " AND ( PlantDescription REGEXP "s/\$keyword/" );" }
you could do
$keywords = join "|", @keywords; $sql_stmt .= "AND ( PlantDescription REGEXP \"$keywords\" )";