SELECT a.t_id, a.t_codice, a.t_nome, a.t_outlet, a.t_sconto_outlet, a.t_larghezza, a.t_lunghezza, a.t_prezzo, a.t_prezzodef, a.t_url, c.nomeITA AS nomecategoria FROM tappeti AS a, categoria AS b, categoria AS c, tappeti_categorie AS d, provenienze AS e WHERE d.tappeto = a.t_id AND d.categoria = b.id AND b.parent = c.id AND a.t_provenienza = e.p_id AND ( (a.t_codice = 'Hamadan') OR (a.t_nome LIKE '%Hamadan%') OR (b.nomeITA LIKE '%Hamadan%') OR (c.nomeITA LIKE '%Hamadan%') OR (e.p_provenienza LIKE '%Hamadan%')) AND t_stato!=2 AND t_stato!=5 AND t_stato!=3 AND (t_status=1) ORDER BY t_id DESC LIMIT 0,12