SELECT A.* , R.symbol, A.nazwaen as nazwa
FROM act_base_asortyment as A left join act_base_firmy as R on A.firma = R.id
WHERE (A.menu_id = '203' OR (A.mcat9 & 8192)) AND (A.foto != '' AND R.xstatus = 2 AND A.nazwaen !='') AND A.status = 1 AND (A.perms & 1) AND A.date_end >= NOW() AND A.date_start <= NOW() AND A.lang & 4
ORDER BY rand()
LIMIT 32