Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header Search - 1064 - an error in your SQL syntax


marymae

Recommended Posts

I cannot get rid of this error since I now use sql 5 on my server. I get the error when I click in the search field in the header. I type in a word that I know is located in my site. I then get the error below. I have tried the fixes showing in this forum but none of it seems to get rid of the error.

 

1064 - 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 ') left join specials s on p.products_id = s.products_id, categories c, products_' at line 1

 

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 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 '%filter%' or p.products_model like '%filter%' or m.manufacturers_name like '%filter%' or p2pef.products_extra_fields_value like '%filter%' or pd.products_description like '%filter%') )

 

Please help with a solution.

 

MaryMae

Link to comment
Share on other sites

I cannot get rid of this error since I now use sql 5 on my server. I get the error when I click in the search field in the header. I type in a word that I know is located in my site. I then get the error below. I have tried the fixes showing in this forum but none of it seems to get rid of the error.

 

1064 - 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 ') left join specials s on p.products_id = s.products_id, categories c, products_' at line 1

 

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 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 '%filter%' or p.products_model like '%filter%' or m.manufacturers_name like '%filter%' or p2pef.products_extra_fields_value like '%filter%' or pd.products_description like '%filter%') )

 

Please help with a solution.

 

MaryMae

 

I found the resolution on the oscMax forum. I needed one more ( after the from. So instead of from ((, I now have from (((

Link to comment
Share on other sites

  • 4 weeks later...

may you need one ( more after the from

 

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 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 '%filter%' or p.products_model like '%filter%' or m.manufacturers_name like '%filter%' or p2pef.products_extra_fields_value like '%filter%' or pd.products_description like '%filter%') )

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...