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