WYJĄTEK

MySQL.class.php, linia: 82

SELECT

SQL_CALC_FOUND_ROWS `e`.`id` AS totalRows,
`e`.`id`, `e`.`id_parent`, `e`.`locked`
, `ml`.`name`,
`m`.`available_quantity`, `m`.`price_retail_net`, `m`.`price_retail_gross`, `m`.`price_stock_net`, `m`.`price_stock_gross`, `m`.`created_at`, `m`.`id_producer`, `pml`.`name` AS producer,
IF (`m`.`show_first`='1', 0, 1) AS specialSort,
`m`.`multiplication`, `tm`.`rate` AS tax_rate,
UPPER(`m`.`symbol`) AS symbol,
`curm`.`symbol` AS currency_symbol, `curm`.`exchange` AS currency_exchange, `curm`.`price_format` AS currency_price_format,
`tm`.`rate` AS tax_rate,
`prml`.`name` AS producer,
`primg`.`filename` AS producerImageFilename,
IF(`pmlb2`.`id_product` IS NOT NULL, 1, 0) AS is_bestseller,
IF(`pmls`.`id_product` IS NOT NULL, 1, 0) AS is_sale,
`img`.`filename` AS mainImageFilename,
`imgl`.`name` AS mainImageName,
`img2`.`filename` AS secondMainImageFilename,
`img2l`.`name` AS secondMainImageName
FROM `a_Element` AS e
INNER JOIN `a_ProductModule` AS m ON (`m`.`id_element`=`e`.`id`)
INNER JOIN `a_ProductModule_lang` AS ml ON (`ml`.`id_element`=`e`.`id` AND `ml`.`id_lang`='297')

LEFT JOIN `a_ProducerModule_lang` AS pml ON (`pml`.`id_element`=`m`.`id_producer` AND `pml`.`id_lang`=`ml`.`id_lang`)
INNER JOIN `a_ProductModule_categories` AS pmc ON (`pmc`.`id_product`=`m`.`id_element` AND `pmc`.`id_category` IN (22821))
LEFT JOIN `a_TaxModule` AS tm ON (`tm`.`id_element`=`m`.`id_tax`)
LEFT JOIN `a_LanguageModule` AS lm ON (`lm`.`id_element`='297')
LEFT JOIN `a_CurrencyModule` AS curm ON (`curm`.`id_element`=`lm`.`id_currency`)
LEFT JOIN `a_ProducerModule_lang` AS prml ON (`prml`.`id_element`=`m`.`id_producer` AND `prml`.`id_lang`=`ml`.`id_lang`)
LEFT JOIN `a_RepositoryModule` AS primg ON (`primg`.`id_linked`=`m`.`id_producer` AND `primg`.`field`='imageList' AND `primg`.`main`='1')
LEFT JOIN `a_ProductModule_labels` AS pmlb2 ON (`pmlb2`.`id_product`=`m`.`id_element` AND `pmlb2`.`id_label`='1556')
LEFT JOIN `a_ProductModule_labels` AS pmls ON (`pmls`.`id_product`=`m`.`id_element` AND `pmls`.`id_label`='732')
LEFT JOIN `a_RepositoryModule` AS img ON (`img`.`id_linked`=`m`.`id_element` AND `img`.`field`='imageList' AND `img`.`main`='1')
LEFT JOIN `a_RepositoryModule_lang` AS imgl ON (`imgl`.`id_element`=`img`.`id_element` AND `imgl`.`id_lang`=`ml`.`id_lang`)
LEFT JOIN `a_RepositoryModule` AS img2 ON (`img2`.`id_linked`=`m`.`id_element` AND `img2`.`field`='imageList' AND `img2`.`main`='2')
LEFT JOIN `a_RepositoryModule_lang` AS img2l ON (`img2l`.`id_element`=`img2`.`id_element` AND `img2l`.`id_lang`=`ml`.`id_lang`)
WHERE `e`.`module` = 'ProductModule'
AND `m`.`active` = '1' AND `m`.`deleted_at` IS NULL AND `e`.`id_parent` IS NULL AND
price_retail_gross>0
GROUP BY `m`.`id_element`

ORDER BY specialSort, name asc
LIMIT -48, 24


#1064 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 '-48, 24' at line 43
#0 /home/biurpaps/domains/biurpap.pl/public_html/class/MySQL.class.php:123
MySQL->query()
#1 /home/biurpaps/domains/biurpap.pl/public_html/class/SiteList.class.php:300
MySQL->fetchQueryResults()
#2 /home/biurpaps/domains/biurpap.pl/public_html/modules/ProductModule/ProductModule.class.php:506
SiteList->elementsList()
#3 /home/biurpaps/domains/biurpap.pl/public_html/modules/CategoryModule/CategoryModule.class.php:531
ProductModule->getList()
#4 /home/biurpaps/domains/biurpap.pl/public_html/modules/CategoryModule/CategoryModule.class.php:92
CategoryModule->getProductList()
#5 /home/biurpaps/domains/biurpap.pl/public_html/index.php:249
CategoryModule->runController()