SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '=' >
SELECT count( distinct a.codice) as CNT,
ANY_VALUE( match(
a.codice, a.ean,
a.nome, a.descrizione, a.note
) against ('90541') ) as score
FROM cat_articoli a
LEFT JOIN cat_gruppi_articoli ga ON ga.codice_articolo = a.codice
LEFT JOIN cat_gruppi g ON g.id = ga.id_gruppo
LEFT JOIN cat_sottocategorie s ON s.id = g.id_sottocategoria
LEFT JOIN cat_categorie as cat on cat.id = s.id_categoria
LEFT JOIN cat_famiglie f ON f.id = cat.id_famiglia
-- tolta perchè ridondante
-- LEFT JOIN cat_cataloghi c ON c.id = f.id_catalogo
LEFT JOIN XA_MATCA00F C_C ON C_C.BCOART = a.codice
LEFT JOIN cat_marche_articoli M ON M.id = a.id_marca
LEFT JOIN articoli_seconda_scelta a2s on a2s.codice = a.codice
WHERE (1=1)
&& as400_visible=1
&& (f.id_catalogo = '0' || '0'='0')
&& (a.codice = '' || '' = '' )
&& (a.id_marca = '0' || '0'='0')
&& (a.news = '0' || '0'='0')
--
&& (cat.key_uq = '' || ''='')
&& (f.key_uq = '' || ''='')
&& (s.key_uq = '' || '' = '' )
--
&& (a.stock = 0 || 0=0) && (g.id = '0' || '0' = '0' )
&& (
(
match(a.codice, a.nome, a.descrizione, a.note, a.ean) against ('90541')
-- gestione codici parziali
|| (a.codice like '%90541%' || '90541'='')
|| (a.nome like '%90541%' || '90541'='')
|| (a.descrizione like '%90541%' || '90541'='')
|| (a.note like '%90541%' || '90541'='')
)
|| a.codice = (select sostituito_da from articoli_sostitutivi where codice like '%90541%'limit 0,1 )
)
&& C_C.BCOCAT = '2'
order by score DESC, a.news DESC, a.codice DESC
> []