Can not execute database query. Please contact site administrator.
2018-02-19T06:56:34-05:00

(
SELECT 1 AS sort_col, products.*,
IF(products.url_custom='',products.url_default,products.url_custom) AS product_url,
catalog.name AS cat_name,
IF(catalog.url_custom='',catalog.url_default,catalog.url_custom) AS cat_url,
manufacturer_name
FROM products
INNER JOIN products_categories ON products_categories.pid = products.pid AND ( products_categories.cid='91' OR products_categories.cid='92' OR products_categories.cid='99' OR products_categories.cid='241' OR products_categories.cid='98' OR products_categories.cid='100' OR products_categories.cid='102' OR products_categories.cid='93' OR products_categories.cid='106' OR products_categories.cid='242' OR products_categories.cid='108' OR products_categories.cid='109' OR products_categories.cid='107' OR products_categories.cid='105' OR products_categories.cid='94' OR products_categories.cid='112' OR products_categories.cid='240' OR products_categories.cid='116' OR products_categories.cid='113' OR products_categories.cid='114' OR products_categories.cid='111' OR products_categories.cid='95' OR products_categories.cid='118' OR products_categories.cid='243' OR products_categories.cid='121' OR products_categories.cid='119' OR products_categories.cid='120' OR products_categories.cid='117' OR products_categories.cid='96' OR products_categories.cid='127' OR products_categories.cid='244' OR products_categories.cid='129' OR products_categories.cid='122' OR products_categories.cid='123' OR products_categories.cid='97' OR products_categories.cid='128' OR products_categories.cid='239' OR products_categories.cid='125' OR products_categories.cid='130' OR products_categories.cid='124' )
INNER JOIN catalog ON products.cid=catalog.cid
LEFT JOIN manufacturers ON manufacturers.is_visible='1' AND products.manufacturer_id = manufacturers.manufacturer_id
WHERE products.is_visible='Yes'

AND products.call_for_price = 'No' AND products.stock > 0
GROUP BY products.pid
ORDER BY products.price, products.title
)
UNION
(
SELECT 2, products.*,
IF(products.url_custom='',products.url_default,products.url_custom) AS product_url,
catalog.name AS cat_name,
IF(catalog.url_custom='',catalog.url_default,catalog.url_custom) AS cat_url,
manufacturer_name
FROM products
INNER JOIN products_categories ON products_categories.pid = products.pid AND ( products_categories.cid='91' OR products_categories.cid='92' OR products_categories.cid='99' OR products_categories.cid='241' OR products_categories.cid='98' OR products_categories.cid='100' OR products_categories.cid='102' OR products_categories.cid='93' OR products_categories.cid='106' OR products_categories.cid='242' OR products_categories.cid='108' OR products_categories.cid='109' OR products_categories.cid='107' OR products_categories.cid='105' OR products_categories.cid='94' OR products_categories.cid='112' OR products_categories.cid='240' OR products_categories.cid='116' OR products_categories.cid='113' OR products_categories.cid='114' OR products_categories.cid='111' OR products_categories.cid='95' OR products_categories.cid='118' OR products_categories.cid='243' OR products_categories.cid='121' OR products_categories.cid='119' OR products_categories.cid='120' OR products_categories.cid='117' OR products_categories.cid='96' OR products_categories.cid='127' OR products_categories.cid='244' OR products_categories.cid='129' OR products_categories.cid='122' OR products_categories.cid='123' OR products_categories.cid='97' OR products_categories.cid='128' OR products_categories.cid='239' OR products_categories.cid='125' OR products_categories.cid='130' OR products_categories.cid='124' )
INNER JOIN catalog ON products.cid=catalog.cid
LEFT JOIN manufacturers ON manufacturers.is_visible='1' AND products.manufacturer_id = manufacturers.manufacturer_id
WHERE products.is_visible='Yes'

AND (products.call_for_price = 'Yes' OR products.stock = 0)
GROUP BY products.pid
ORDER BY products.price, products.title
)

ORDER BY sort_col,
LIMIT 0, 10


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 'LIMIT 0, 10' at line 36