Can not execute database query. Please contact site administrator.
2017-11-23T06:20:31-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='4' OR products_categories.cid='75' OR products_categories.cid='35' OR products_categories.cid='34' OR products_categories.cid='36' OR products_categories.cid='161' OR products_categories.cid='166' OR products_categories.cid='233' OR products_categories.cid='181' OR products_categories.cid='201' OR products_categories.cid='13' OR products_categories.cid='79' OR products_categories.cid='78' OR products_categories.cid='205' OR products_categories.cid='196' OR products_categories.cid='190' OR products_categories.cid='225' OR products_categories.cid='191' OR products_categories.cid='230' OR products_categories.cid='256' OR products_categories.cid='249' OR products_categories.cid='250' OR products_categories.cid='252' OR products_categories.cid='253' OR products_categories.cid='254' OR products_categories.cid='199' OR products_categories.cid='212' OR products_categories.cid='159' OR products_categories.cid='27' OR products_categories.cid='80' OR products_categories.cid='81' )
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='4' OR products_categories.cid='75' OR products_categories.cid='35' OR products_categories.cid='34' OR products_categories.cid='36' OR products_categories.cid='161' OR products_categories.cid='166' OR products_categories.cid='233' OR products_categories.cid='181' OR products_categories.cid='201' OR products_categories.cid='13' OR products_categories.cid='79' OR products_categories.cid='78' OR products_categories.cid='205' OR products_categories.cid='196' OR products_categories.cid='190' OR products_categories.cid='225' OR products_categories.cid='191' OR products_categories.cid='230' OR products_categories.cid='256' OR products_categories.cid='249' OR products_categories.cid='250' OR products_categories.cid='252' OR products_categories.cid='253' OR products_categories.cid='254' OR products_categories.cid='199' OR products_categories.cid='212' OR products_categories.cid='159' OR products_categories.cid='27' OR products_categories.cid='80' OR products_categories.cid='81' )
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