This is the query: SELECT header FROM tt_content WHERE pid=15951 AND tt_content.deleted=0 AND tt_content.t3ver_state<=0 AND tt_content.pid<>-1 AND tt_content.hidden=0 AND tt_content.starttime<=1521461640 AND (tt_content.endtime=0 OR tt_content.endtime>1521461640) AND (tt_content.fe_group='' OR tt_content.fe_group IS NULL OR tt_content.fe_group='0' OR FIND_IN_SET('0',tt_content.fe_group) OR FIND_IN_SET('-1',tt_content.fe_group)) ORDER BY sorting DESC