doctorTheo Posted February 2, 2004 Share Posted February 2, 2004 Hello When I use the search and/or advanced search i receive an error 1064: 1064 - You have an error in your SQL syntax near 'distinct p.products_id) as total from products p left join manufacturers m usin' at line 1 select count(distinct p.products_id) as total from products p left join manufacturers m using(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 = '4' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%ass%' or p.products_model like '%ass%' or m.manufacturers_name like '%ass%') ) *** Any idea how to solve the problem? I am completely new to PHP/Mysql ! Thanks Theo Link to comment Share on other sites More sharing options...
doctorTheo Posted February 3, 2004 Author Share Posted February 3, 2004 I did a brand new fresh install with new database, new folder, no modif and I am getting the same error 1064 using SEARCH and AVDANCED SEARCH using the demo ! Is there a bug on the original files? Thanks Link to comment Share on other sites More sharing options...
doctorTheo Posted February 3, 2004 Author Share Posted February 3, 2004 Problem solved I found out the problem. There is a bug in the file catalog/advanced_search_result.php Near line 207 there is this code: $select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, 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 "; *******You must remove "distinct" for the Search/advanced search to work Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.