SELECT * FROM pages WHERE (pagLanguages = '' OR pagLanguages LIKE '%;{language.symbol};%') AND (pagCategories = '' OR pagCategories LIKE '%;{category.id};%') AND pagStatus='1' LIMIT {offset.current},{category.limit}