select product.pid,product.priorit,product.item_number,product.extra_info,product.vat,product.vat_notation,product.minimum_order,product.amount_unit,product.unit,product.active,product.is_purchase,product.price_calculator,product.extra_deliver_price,product_description.name,product_description.short_dc,product_description.long_dc,_seo_.url,_seo_.title,_seo_.keywords,_seo_.description,_seo_.id as seoId,product_picture.picture_name,product_picture.extension,product_price.netto_price as netto_price,(product_price.netto_price * (1+(product.vat/100))) as brutto_price,product_price.netto_low_price as netto_low_price,(product_price.netto_low_price * (1+(product.vat/100))) as brutto_low_price, (select priorit FROM product_category_connect WHERE product.pid=product_category_connect.pid AND product_category_connect.pc_id= limit 1) as cPriorit FROM product LEFT JOIN product_description ON (product.pid=product_description.pid) LEFT JOIN _seo_ ON (_seo_.connect=product.pid AND _seo_.component='product')LEFT JOIN product_picture ON (product_picture.pid=product.pid AND product_picture.main='1')LEFT JOIN product_price ON (product_price.pid=product.pid AND product_price.cuid='1') WHERE 1 AND product.pid IN (select pid FROM product_category_connect WHERE pc_id IN ('0','')) AND product.active='1' ORDER BY cPriorit ASC LIMIT 0,28