SELECT t1.id AS cat_id, t1.id_cat_redirect AS cat_id_redirect, t1.url_it AS cat_url, t2.url_it AS cat_url_redirect FROM xtra_cat AS t1 LEFT JOIN xtra_cat AS t2 ON t2.id=t1.id_cat_redirect LEFT JOIN data_cat_country AS t3 ON (t3.id_cat=t1.id AND t3.id_country='30' AND t3.id_language='it') WHERE LOWER(t1.url_it)='hotel' || LOWER(t3.url_cat)='hotel' Array ( [cat_id] => 56 [cat_id_redirect] => 6 [cat_url] => hotel [cat_url_redirect] => hotel )