Chyba pocas behu aplikacie: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2781984, 24' at line 1 -> select product_id, product_related_id, (select sum(wi_amount) as my_amount from warehouse_item join warehouse on warehouse_id=wi_warehouse_id and warehouse_mw_id=2 and warehouse_recordactive=1 and (warehouse_type=0 or warehouse_type=3) where wi_recordactive=1 and wi_product_id = product_id) as warehouse_plus, (select sum(wi_amount) as my_amount from warehouse_item join warehouse on warehouse_id=wi_warehouse_id and warehouse_mw_id=2 and warehouse_recordactive=1 and (warehouse_type=1 or warehouse_type=4) where wi_recordactive=1 and wi_product_id= product_id) as warehouse_minus from product join catalogue on catalogue_product_id = product_id left join product_related on product_related_type=0 and product_related_recordactive=1 and product_related_product_id=product_id join pricelist on pricelist_product_id=product_id and pricelist_price1<>0 join lib_vat on lvat_id = product_lvat_id where catalogue_parent_id = 6940313 and product_recordactive = 1 and catalogue_recordactive = 1 and pricelist_price1*1.2 between 0 and 1190 group by product_id order by catalogue_order LIMIT -2781984, 24