si... ma dovrei fare una cosa cosi... Select from foto where "id è la minore e piu'vicina a id n°5" AND categoria='Gatti'