come non detto, mi è venuta l'illuminazione..

il campo nel db cat_foto era testo, andava numerico
grazie comunque per il supporto