♥jailaxmi Posted March 2, 2006 Posted March 2, 2006 When I try to do an advanced search, I get the following 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 'select distinct p.products_image, m.manufacturers_id, p.products_id, pd.product' at line 1 select count(distinct p.products_id) as total select distinct p.products_image, 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 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 '%laxmi%' or p.products_model like '%laxmi%' or m.manufacturers_name like '%laxmi%' or p2pef.products_extra_fields_value like '%laxmi%' or pd.products_description like '%laxmi%') ) I have no clue about what it means or where it's coming from, but I noticed that it mentions "products_extra_fields" which is a contribution I installed and then removed because it was causing me problems. Now, my guess is that it is related to this contribution, but I don't know anything about MySQL syntax. I looked everywhere for "products_extra_fields" in al my files and by browsing the database, but couldn't find it anywhere. Please help!!! jailaxmi I repeat myself when under stress, I repeat myself when under stress, I repeat myself... --King Crimson (“Discipline”)
♥jailaxmi Posted March 3, 2006 Author Posted March 3, 2006 When I try to do an advanced search, I get the following 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 'select distinct p.products_image, m.manufacturers_id, p.products_id, pd.product' at line 1 select count(distinct p.products_id) as total select distinct p.products_image, 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 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 '%laxmi%' or p.products_model like '%laxmi%' or m.manufacturers_name like '%laxmi%' or p2pef.products_extra_fields_value like '%laxmi%' or pd.products_description like '%laxmi%') ) I have no clue about what it means or where it's coming from, but I noticed that it mentions "products_extra_fields" which is a contribution I installed and then removed because it was causing me problems. Now, my guess is that it is related to this contribution, but I don't know anything about MySQL syntax. I looked everywhere for "products_extra_fields" in al my files and by browsing the database, but couldn't find it anywhere. Please help!!! jailaxmi I was able to remove the "products_extra_fields" part, but now when I do a search I get this similar message: 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 'select distinct p.products_image, m.manufacturers_id, p.products_id, pd.product' at line 1 select count(distinct p.products_id) as total select distinct p.products_image, 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 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 ( or pd.products_description like '%yoga%') ) And my right column disappears! Please help anyone! jailaxmi I repeat myself when under stress, I repeat myself when under stress, I repeat myself... --King Crimson (“Discipline”)
kgt Posted March 3, 2006 Posted March 3, 2006 select count(distinct p.products_id) as total select distinct p.products_image... ...is rubbish SQL. Looks like you might have incorrectly installed the contribution, then didn't uninstall it correctly. Contributions Discount Coupon Codes Donations
♥jailaxmi Posted March 3, 2006 Author Posted March 3, 2006 select count(distinct p.products_id) as total select distinct p.products_image... ...is rubbish SQL. Looks like you might have incorrectly installed the contribution, then didn't uninstall it correctly. Thanks, that was actually helpful! I went and changed the advanced_search.php and advanced_search_result.php files and it seems to be working fine now... I hope there won't be any more surprises! Now, here another question... If I modify the sql with a contribution (say it adds stuff through an sql file), how do I remove that? Thanks again! jailaxmi I repeat myself when under stress, I repeat myself when under stress, I repeat myself... --King Crimson (“Discipline”)
kgt Posted March 3, 2006 Posted March 3, 2006 Now, here another question... If I modify the sql with a contribution (say it adds stuff through an sql file), how do I remove that? It depends on the changes made. If there were only additions (new tables, new columns on existing tables) then it's easy enough to use phpMyAdmin to just delete the new tables and columns. If it consists of modifications (changes made to existing columns on existing tables, such as changing the size limitations on columns), then you can probably get away with not backing out the change at all. You should backup your database before you ever make any changes. If you install a modification that alters your database, you can easily back out of those changes by restoring from a backup, and you won't have to worry about removing the right columns and tables. Contributions Discount Coupon Codes Donations
♥jailaxmi Posted March 7, 2006 Author Posted March 7, 2006 It depends on the changes made. If there were only additions (new tables, new columns on existing tables) then it's easy enough to use phpMyAdmin to just delete the new tables and columns. If it consists of modifications (changes made to existing columns on existing tables, such as changing the size limitations on columns), then you can probably get away with not backing out the change at all. You should backup your database before you ever make any changes. If you install a modification that alters your database, you can easily back out of those changes by restoring from a backup, and you won't have to worry about removing the right columns and tables. Thanks for your reply! I do backup the database before I make any changes. Sometimes the errors don't show up right away, though, but a few modifications and backups later... :blush: But that is great advise, and I'll think about that next time. Thanks again! jailaxmi I repeat myself when under stress, I repeat myself when under stress, I repeat myself... --King Crimson (“Discipline”)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.