You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and abilitata='1' and id_padre=0 order by data_ord asc limit 0,1' at line 1select *, cms_pagine_new.id as id_item from cms_pagine_new inner join cms_pagine_new_lingue on cms_pagine_new.id=cms_pagine_new_lingue.id_cms_pagine_new where id_lingua= and abilitata='1' and id_padre=0 order by data_ord asc limit 0,1