SEARCH: Закрыть
Incorrect usage of UNION and LIMIT SQL=select p.virtuemart_product_id, l.product_name from spi_virtuemart_products AS p, spi_virtuemart_products_en_gb as l where p.product_sku = '' and p.published = '1' and p.virtuemart_product_id = l.virtuemart_product_id LIMIT 0,5 union (select p.virtuemart_product_id, l.product_name from spi_virtuemart_products AS p, spi_virtuemart_products_en_gb as l where l.product_name LIKE '%' and p.published = '1' and p.virtuemart_product_id = l.virtuemart_product_id LIMIT 0,5) union (select p.virtuemart_product_id, l.product_name from spi_virtuemart_products AS p, spi_virtuemart_products_en_gb as l where (l.product_name LIKE '%%' ) and p.published = '1' and p.virtuemart_product_id = l.virtuemart_product_id LIMIT 0,5) union (select p.virtuemart_product_id, l.product_name from spi_virtuemart_products AS p, spi_virtuemart_products_en_gb as l where p.product_sku LIKE '%' and p.published = '1' and p.virtuemart_product_id = l.virtuemart_product_id LIMIT 0,5) union (select p.virtuemart_product_id, l.product_name from spi_virtuemart_products AS p, spi_virtuemart_products_en_gb as l where l.product_desc LIKE '%%' and p.published = '1' and p.virtuemart_product_id = l.virtuemart_product_id LIMIT 0,5) union (select p.virtuemart_product_id, l.product_name from spi_virtuemart_products AS p, spi_virtuemart_products_en_gb as l where l.product_s_desc LIKE '%%' and p.published = '1' and p.virtuemart_product_id = l.virtuemart_product_id LIMIT 0,5) LIMIT 0,5