♥ecartz Posted July 26, 2009 Share Posted July 26, 2009 select count(distinct p.products_id) as total from (products p left join products_to_products_extra_fields p2pef on p.products_id=p2pef.products_id) left join manufacturers m on m.manufacturers_id=p.manufacturers_id, products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c, products_description pd, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%huggies%' or p.products_model like '%huggies%' or m.manufacturers_name like '%huggies%' or p2pef.products_extra_fields_value like '%huggies%' or pd.products_description like '%huggies%') )You have products_description pd in the query twice. Remove the second one and the two after it: ", products_description pd, categories c, products_to_categories p2c". If you can't figure it out from the code, you'll need to post the parts that refer to any of those three tables. Quote Always back up before making changes. Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.