LazyCat Posted May 14, 2003 Posted May 14, 2003 hi everyone. Search function, prior to the new milestone, gave an SQL error whenever you left an unmatched ( or ) in your search string. now the bug is fixed, but another one remains: if your search string is like "something ()" i'll have as a result: 1064 - You have an error in your SQL syntax near '( (pd.products_name like '%%' or p.products_model like '%%' or m.manufacturers_n' at line 1 select count(*) 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 '%something%' or p.products_model like '%something%' or m.manufacturers_name like '%something%') ( (pd.products_name like '%%' or p.products_model like '%%' or m.manufacturers_name like '%%') ) ) as you can see it builds a "where" part around nothing and that causes the error. there's a quick way to fix it? i'm not a good php coder so i appreciate any suggestion. thanks a lot!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.