zeliha Posted July 22, 2003 Posted July 22, 2003 i have downloaded ms2 in localhost, everything works fine but when i search result: 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 i have checked the forums but i should have missed something, anybody can give me clue. i have seen some messages, tried no result. sorry my english is not so good.
Guest Posted July 22, 2003 Posted July 22, 2003 This may be a bug in the version of PHP you are using.
zeliha Posted July 22, 2003 Author Posted July 22, 2003 i have just updated php to newest version, still i have this message in localhost. what am i gone do i do not know, i hate 1064 Products meeting the search criteria 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 '%sdfs%' or p.products_model like '%sdfs%' or m.manufacturers_name like '%sdfs%') ) [TEP STOP]
Daemonj Posted July 22, 2003 Posted July 22, 2003 You should download and install a newer version of osC. The fix to your problem is that the statement should be select distinct count(p.products_id) as total "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
zeliha Posted July 22, 2003 Author Posted July 22, 2003 thanks for your interest but i could not find the file. if you could mention in which file than i could check and find the solution. there is a line select count (*) as total, could it be possible distinct means (*) select distinct count(p.products_id) as total, 07/18/2003 ms2 i am very furious to use this programme.
Daemonj Posted July 23, 2003 Posted July 23, 2003 thanks for your interest but i could not find the file.if you could mention in which file than i could check and find the solution. there is a line select count (*) as total, could it be possible distinct means (*) select distinct count(p.products_id) as total, 07/18/2003 ms2 i am very furious to use this programme. I would imagine that line of code to change would be in the advanced_search_results.php file. That code should not be there to begin with which is why I suggested you download a newer version of osC. The download that you have is bad. Did you download and install the files yourself, have someone else do it, or click on a button in your server's control panel? I can certainly understand your frustration. I can only imagine the other problems that you are encountering! Again, instead of attempting to edit that line, I seriously suggest removing what you have and downloading and installing a newer version. "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
zeliha Posted July 23, 2003 Author Posted July 23, 2003 i thought it was the newest version for ms2, it has been working in my computer before upload, anyhow i have checked opened the advanced_search_results.php and searched with ctrl+f. there was not such a line like that, then i found select count and changed with some more options, one option was deleted count from select count line, normally i should see the changes in error page. it must be written: 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 (distinct p.products_id) in order to 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) cause 'count' has deleted anyhow i should see the mistake for the connection between lines. Even the errror code does not mention from which table, or file is created this errror. if so it will be much easier fro me to find. i will download the newest version and will try again.
zeliha Posted July 23, 2003 Author Posted July 23, 2003 i have downloaded the new version, it does not still work. somebody explain what is written in the error line, i could not find the line, please help
zeliha Posted July 23, 2003 Author Posted July 23, 2003 i have found the problem, dear friends, new version of ms2 does not support earlier (3.22, 3.24) than mysql 4.0.13 or we can say there is not easy solution for this problem. we should have guess this since the error line could not find in all the files.
zeliha Posted July 24, 2003 Author Posted July 24, 2003 i am curious about whether any1 works 2.2ms2 with mysql 3.23.57 since my server did not update to 4.0.13.
Daemonj Posted July 24, 2003 Posted July 24, 2003 I have 3 sites running MS2 with MySQL v3.23.56 and PHP v4.3.1 and am encountering no problems. "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
Justin WFCOMICS Posted July 27, 2003 Posted July 27, 2003 I have 3 sites running MS2 with MySQL v3.23.56 and PHP v4.3.1 and am encountering no problems. Interesting, I am under the impression that the search feature for 2.2ms2 does not work with versions of MySQL under version 4 because it does not support or correctly handle "distinct" and/or the ansi join syntax. Anyway, I also had this problem, but found a solution that mostly works. Take a look here and please feel free to post a response if you have additional insights (as I still need a small fix)... http://www.oscommerce.com/forums/viewtopic.php?p=202768 I hope this is useful! Justin =)
zeliha Posted July 27, 2003 Author Posted July 27, 2003 dear justin, i am very much pleased to hear that i did not spend my time for nothing. dear friends, for future errors, i can say that if the error syntax could not be found in files (dreamveaver-F8-(ctrl+f) search in source), we can say one of the compenent must be update.
Daemonj Posted July 28, 2003 Posted July 28, 2003 Interesting, I am under the impression that the search feature for 2.2ms2 does not work with versions of MySQL under version 4 because it does not support or correctly handle "distinct" and/or the ansi join syntax. MySQL v3.5x and higher definitely supports the distinct and join syntax. As of v4.x does MySQL support sub-selects in place of joins but sub-selects are not used in osC at this point. "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
Justin WFCOMICS Posted July 28, 2003 Posted July 28, 2003 MySQL v3.5x and higher definitely supports the distinct and join syntax. As of v4.x does MySQL support sub-selects in place of joins but sub-selects are not used in osC at this point. Aaah :). Thanks for the clarification. So one should be fine if they use versions 3.5 or higher? My problem is my Web host only offers MySQL 3.23.56. Justin =)
Daemonj Posted July 28, 2003 Posted July 28, 2003 MySQL v3.5x and higher definitely supports the distinct and join syntax. As of v4.x does MySQL support sub-selects in place of joins but sub-selects are not used in osC at this point. Aaah :). Thanks for the clarification. So one should be fine if they use versions 3.5 or higher? My problem is my Web host only offers MySQL 3.23.56. Justin =) You should be fine with that. That is the same version that I am using as well. My post was meant to say v3.2x but I must have been thinking about the .56 part when typing. :oops: "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
Justin WFCOMICS Posted July 28, 2003 Posted July 28, 2003 You should be fine with that. That is the same version that I am using as well. My post was meant to say v3.2x but I must have been thinking about the .56 part when typing. :oops: Hmmm... Several people have reported the same thing. Any idea what could be the problem? http://www.oscommerce.com/community/bugs,1233 Thanks for the re-clarification on versions :). Justin =)
Daemonj Posted July 28, 2003 Posted July 28, 2003 Unfortunately I do not as all of my sites (and my customers sites) are using the same version of MySQL with MS2 and do not have a problem. This is truly perplexing. If you wish, I can upload MS2 to my test server, allowing you to do a search and view the server info in the admin panel to verify software versions. Are you using the Search displayed on the main screen or the Advanced search. If the advanced search, what options do you have selected? "Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein
Recommended Posts
Archived
This topic is now archived and is closed to further replies.