SELECT codice, immagine , permalink ,
(SELECT titolo_it FROM categorie WHERE id = prodotti.categoria_1 LIMIt 1) as titolo
FROM prodotti
WHERE attivo = 'on'
AND pubblico = 'on'
AND (categoria_1 = 219 OR categorie LIKE '%,219,%')
ORDER BY ordine DESC
Deadlock found when trying to get lock; try restarting transaction