SELECT ct.url, c.lunghezza, c.difficolta, c.struttura, c.codice_visibile, c.id, i.pic, c.prezzo1, c.prezzo2, c.prezzo3, c.data_inizio, c.data_fine, ct.testo_prezzo1, ct.testo_prezzo2, ct.testo_prezzo3, ct.titolo, ct.sottotitolo, ct.descrizione_breve, ct.date, a.id AS attivita_id, ia.pic AS attivita_ico, at.title AS attivita_title, at.meta_title AS catalogo_attivita_texts_meta_title, at.meta_descr AS catalogo_attivita_texts_meta_descr, at.meta_keys AS catalogo_attivita_texts_meta_keys, at.text_box AS catalogo_attivita_text_box, f.descr AS catalogo_formula_title, f.id AS catalogo_formula_id, GROUP_CONCAT(DISTINCT rt.title separator ', ') AS catalogo_regioni_texts_title, GROUP_CONCAT(DISTINCT pt.title separator ', ') AS catalogo_periodi_texts_title, GROUP_CONCAT(DISTINCT dt.title separator ', ') AS catalogo_durate_texts_title, GROUP_CONCAT(DISTINCT cft.title separator ', ') AS catalogo_comfort_texts_title FROM catalogo c LEFT JOIN catalogo_texts ct ON c.id = ct.idtab AND ct.lan = 'it' LEFT JOIN image_gallery i ON c.pic = i.id LEFT JOIN catalogo_attivita a ON c.catalogo_attivita_id = a.id LEFT JOIN catalogo_attivita_texts at ON at.lan = 'it' AND at.idtab = a.id LEFT JOIN image_gallery ia ON a.pic = ia.id LEFT JOIN catalogo_formula f ON f.id = c.catalogo_formula_id LEFT JOIN catalogo_regioni_corr rc ON c.id = rc.catalogo_id LEFT JOIN catalogo_regioni r ON rc.catalogo_regioni_id = r.id LEFT JOIN catalogo_regioni_texts rt ON rt.lan = 'it' AND rt.idtab = r.id LEFT JOIN catalogo_periodi_corr pc ON c.id = pc.catalogo_id LEFT JOIN catalogo_periodi p ON pc.catalogo_periodi_id = p.id LEFT JOIN catalogo_periodi_texts pt ON pt.lan = 'it' AND pt.idtab = p.id LEFT JOIN catalogo_durate_corr dc ON c.id = dc.catalogo_id LEFT JOIN catalogo_durate d ON dc.catalogo_durate_id = d.id LEFT JOIN catalogo_durate_texts dt ON dt.lan = 'it' AND dt.idtab = d.id LEFT JOIN catalogo_comfort_corr cfc ON c.id = cfc.catalogo_id LEFT JOIN catalogo_comfort cf ON cfc.catalogo_comfort_id = cf.id LEFT JOIN catalogo_comfort_texts cft ON cft.lan = 'it' AND cft.idtab = cf.id WHERE c.status = 1 AND ct.titolo <> '' AND (c.catalogo_attivita_id=1®ione=1 OR catalogo_attivita_id2=1®ione=1) GROUP BY c.id ORDER BY c.pos DESC, rt.title ASC, ct.titolo,c.pos
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '«ione=1 OR catalogo_attivita_id2=1┬«ione=1) GROUP BY c.id ORDE' at line 84