SELECT page.page_id AS page_id, `var1`, `var2`, `p_disable`, `page_type_class_name`, page_menu_name, path_lang, page_keywords as keywords, page_description as description FROM page, page_site_lang, page_type WHERE page.page_id = page_site_lang.page_id AND page_type.page_type_id = page.page_type AND site_lang_id = '1' AND page_visible = '1' AND lang_visible = '1' AND page_parent = '0' AND authority_id < '1' order by page_sortQUERY: select * from `prod_cat_data` where ( `old_cena` > 0 or `main` = '1' or `star` = '1' ) and `visible` = '1' order by rand() limit 12