La référence d'objet n'est pas définie à une instance d'un objet.
SELECT DISTINCT a.id,a.id_usager usager,a.titre_fr,a.titre_seo,a.ref,a.coord,a.niveau_priorite,a.etat,a.url,a.activite, a.video,a.description_fr description,a.description_plus_fr description_plus,a.description_parking_fr description_parking ,a.dpe,a.ges,a.cloud3d_file , a.nom_contact ,a.mail_contact,a.tel_contact,a.tel_contact_mobile, a.type,a.nature,a.coworking_type,a.poste_max,a.divisible, a.surface_dispo surface, a.loyer_mensuel,a.loyer_annuel, a.certif_geo,a.lat,a.lng,a.adresse,a.nom_immeuble,a.etage, a.ville _vid,a.departement _did,a.region _rid, DATE_FORMAT(a.date_create,'%d/%m/%Y') _date_create,a.timestamp_create,DATE_FORMAT(a.date_update,'%d/%m/%Y') _date_update, p.nom_photo photo,p.legende_fr photo_alt, row_number() over (partition BY a.id_usager order BY a.niveau_priorite) rn, IF(a.nature='FON', (SELECT GROUP_CONCAT(_aa.activite SEPARATOR ',') FROM annonce_activite _aa WHERE annonce=a.id) , null) _activites ,IFNULL( IF(a.type='COW', a.loyer, IF(a.type = 'LOC', (IF(a.loyer_min IS NOT NULL AND a.loyer_min<>'' AND a.loyer_min > 0,a.loyer_min,a.loyer) * IF(a.surface_min IS NOT NULL AND a.surface_min<>'' AND a.surface_min<>a.surface_dispo AND a.surface_min < a.surface_dispo,a.surface_min,a.surface_dispo )) / 12, IF(a.prix_vente_min IS NOT NULL AND a.prix_vente_min<>'' AND a.prix_vente_min > 0,a.prix_vente_min,a.prix_vente) ) ),0) tarif, IFNULL( IF(a.type = 'VEN', a.prix_vente, a.loyer) ,0) tarif_total, IFNULL( IF(a.type='COW', a.loyer, IF(a.type = 'LOC', IF(a.loyer_min IS NOT NULL AND a.loyer_min<>'' AND a.loyer_min > 0,a.loyer_min,a.loyer), IFNULL(a.prix_vente_m2, IF(a.prix_vente_min IS NOT NULL AND a.prix_vente_min<>'' AND a.prix_vente_min > 0,a.prix_vente_min,a.prix_vente) / IFNULL(a.surface_min,a.surface_dispo)) ) ),0) tarif_m2, IF(a.type='LOC', IF(a.loyer_min IS NOT NULL AND a.loyer_min < a.loyer,1,0) , IF(a.prix_vente_min IS NOT NULL AND a.prix_vente_min <= a.prix_vente,1,0) ) tarif_min ,IF(a.surface_min IS NOT NULL AND a.surface_min < a.surface_dispo AND a.divisible=1,a.surface_min,NULL) surface_min FROM annonce a LEFT OUTER JOIN photo p ON a.id=p.id_annonce AND p.etat='VAL' AND p.`type`='PHOTO' AND p.rang=1 WHERE (a.ville<>0 OR ISNULL(a.ville)) AND NOT ISNULL(a.region) AND a.id=626610