in reply to map DBI results

map evalutes the last expression, so you are returning the number of substitions found by s///. Try this instead:
while (my @row = map { s/$term/"<i>$term<\/i>"/; $_ } $sth->fetchrow_a +rray()) {
You also need to escape the slash in </i>. Check out Map: The Basics for more examples on map.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)