Database Error
SQL: SELECT
p.products_image, pd.products_name, m.manufacturers_name,
p.products_id,
p.manufacturers_id,
p.products_price,
p.products_model,
p.products_casesize,
p.products_casetype,
p.products_case_sale_only,
pd.products_name,
pd.products_child_name,
p.products_quantity,
p.products_stock_type,
p.products_tax_class_id,
p.products_is_child,
p.products_is_master,
pd.products_child_name,
apd.category_sales_rank,
IF(apd.category_sales_rank = 0, 99999, apd.category_sales_rank) AS salesrank,
apd.num_reviews,
apd.avg_review_score,
apd.num_views_7_days,
apd.num_sold_7_days,
IF(p.products_date_added != '0000-00-00 00:00:00', p.products_date_added, p.products_last_modified) AS products_date_added,
SUM(t.tag_weight) AS weighting,
IF(m.manufacturers_id IS NULL, 'new', m.manufacturers_url_safe_name) AS manufacturers_url_safe_name,
pd.products_url_safe_name,
p.products_date_available,
p.products_image,
p.products_status,
p2c.categories_id,
IF(p2c.featured = 1, -1,
IF(p2c.products_categories_order > 0, p2c.products_categories_order,
IF(p.products_date_available > DATE_ADD(NOW(), INTERVAL 7 DAY), 5000,
IF(s.specials_id IS NOT NULL, 3000,
IF(p.products_casesize > 0, 2000,
IF(pxt_new.tag_id IS NOT NULL, 1000, 4500)
)
)
)
)
) AS products_position,
tr.tax_rate,
IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price,
IF(s.status, s.specials_new_products_price, p.products_price) as final_price
,pic.products_model as productInCatalogue
from products AS p
LEFT JOIN products_description AS pd ON p.products_id = pd.products_id
LEFT JOIN manufacturers AS m ON p.manufacturers_id = m.manufacturers_id
LEFT JOIN product_x_tags AS pt ON p.products_model = pt.model_id
left join product_x_tags AS pxt_new ON p.products_model = pxt_new.model_id AND pxt_new.tag_id = 6001
LEFT JOIN tags AS t ON pt.tag_id = t.tag_id
LEFT JOIN tax_rates AS tr ON p.products_tax_class_id = tr.tax_class_id
LEFT JOIN agg_product_data AS apd ON p.products_id = apd.products_id
LEFT JOIN specials AS s ON p.products_id = s.products_id LEFT JOIN products_to_categories_new AS p2c ON p.products_id = p2c.products_id
LEFT JOIN categories_new AS c ON p2c.categories_id = c.categories_id
LEFT JOIN products_in_catalogue as pic
on pic.products_model = p.products_model
WHERE (( p.products_is_child='0' AND (p.products_carrot ='0' && p.products_status=1 && (p.products_stock_type=2 || p.products_stock_type=1 || p.products_quantity > 0))
AND p.product_shown_on_website = 1 AND
pd.language_id = 1 AND p.products_model NOT LIKE 'CX%' AND c.categories_visible = 1 ) or ( pic.products_model is not null and p.products_is_child <> 1)) AND (( (pd.products_name LIKE '%15483%' OR
p.products_model LIKE '%15483%' OR
m.manufacturers_name LIKE '%15483%' OR
t.tag_description LIKE '%15483%' ) and or and (pd.products_name LIKE '%715257%' OR
p.products_model LIKE '%715257%' OR
m.manufacturers_name LIKE '%715257%' OR
t.tag_description LIKE '%715257%' ) or (pd.products_name LIKE '%15483%and%or%and%715257%' OR
p.products_model LIKE '%15483%and%or%and%715257%' OR
m.manufacturers_name LIKE '%15483%and%or%and%715257%' OR
t.tag_description LIKE '%15483%and%or%and%715257%' ) )) group by p.products_id order by weighting desc, products_last_modified desc LIMIT 25
Error: 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 'or and (pd.products_name LIKE '%715257%' OR
p.products_model LIKE '%71' at line 64 (1064)
URL: www.ethicalsuperstore.com/rss/search/15483-or-715257/)
Date: Sat, 18 May 2013 07:26:38 +0100