codice:
SELECT *, if(year(now()) - year(data) >= 5, 1, 0) as lasso
FROM tabella

e poi

if($row['lasso'] == 1) {
print "<img src=\"immagini/verde.jpg\" width=\"15\" height=\"15\" border=\"0\" title=\"";