Bug Reports
SQL Syntax error during the purchase confirmation
Started August 8, 2011 by Simone
Hello everyone.I'm itlian, sorry, but my english is not perfect... I've dowloaded the script, installed, custom according to my preferences and completely translated into italian language; and I've choosen PayPal as the payment method.Now I'm testing my page in localhost, this is my problem:[b]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 'AS ID, t2.field_comment AS FCOMMENT FROM form_fields AS t1, form_field_translati' at line 1[/b]What it means?~Thanks~
31 replies
Hey,Which version of MySQL and MDS are you using?
Hello Ryan,MDS: milliondollarscript-2.0.15MySQL version: 5.5.8
You have a newer version of MySQL.You may want to try the dev snapshot and see if that works any better.You probably would want to start with a fresh install to test with.
[quote="Ryan" post=453]You have a newer version of MySQL.You may want to try the dev snapshot and see if that works any better.You probably would want to start with a fresh install to test with.[/quote]Sorry, but I don't know what is the [i]dev snapshot[/i]...Can you explain what is?My page project is really important for me!! :)
Go to the home page and under the Download link is a Development Snapshot link. Or just go here: https://milliondollarscript.com/downloads/million-dollar-script/million-dollar-script-svn-snapshot/It may or may not work. I haven't had time lately to do much work. I want to finish this next release but I have to make some money to pay the bills with apparently.
[quote="Ryan" post=456]Go to the home page and under the Download link is a Development Snapshot link. Or just go here: https://milliondollarscript.com/downloads/million-dollar-script/million-dollar-script-svn-snapshot/It may or may not work. I haven't had time lately to do much work. I want to finish this next release but I have to make some money to pay the bills with apparently.[/quote]Okay Ryan, thanks!I'll try the Dev. Snap soon!Thanks. :)
[quote="Ryan" post=456]Go to the home page and under the Download link is a Development Snapshot link. Or just go here: https://milliondollarscript.com/downloads/million-dollar-script/million-dollar-script-svn-snapshot/It may or may not work. I haven't had time lately to do much work. I want to finish this next release but I have to make some money to pay the bills with apparently.[/quote]Hello Ryan,I've tried my MDS with the Dev. Snap., but unfortunately there is the syntax error yet: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 'AS ID, t2.field_comment AS FCOMMENT FROM form_fields AS t1, form_field_translati' at line 1I must solve this problem absolutely!!! :unsure:
Hi,How did you go about doing the translation to the new language?I may have found a bug when creating language translations in the first place. I haven't finished fixing it yet though.
Ok, test the newest dev snapshot and see. I updated the file /includes/dynamic_forms.php on the SVN with a possible fix for creating the translation in the first place. I am not sure if this is related to your issue or not. However, if you created your translation with the translation tool in the admin area this hopefully would fix some of that.There looks like there may be some other things to mess with for the Ad form field translations but we shall see.
Hello;for the translation into italian language, in first I've created a copy of the "english.php" file and "english_default.php" and renamed "italian.php" and "italian_default.php". So, I've done a complete translation of ALL the words, phrases and script instructions from english to italian language with the TRANSLATION TOOL in the Admin Area. It was a very long work...Ok Ryan, I'll try the new Dev. Snap.!Thanks
No... there's the same error again: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 'AS ID, t2.field_comment AS FCOMMENT FROM form_fields AS t1, form_field_translati' at line 1What we can do?
Hi there,I don't have time right now to check this out but if you email me your translation files and your mysql database to [redacted email] I can test it out on my install and see if I can duplicate it and provide a fix when I get some time. I have to come up with $50 to pay for this server or it's going down.Ryan
Hello Ryan,I've sended the two translation files to you:-italian.php-italian_default.phpunfortunately I don't know how I can send my database to you. I'm working in localhost.Thanks
Hello Ryan, news?-Regards
Hello,Sorry but I can't reproduce the problem with the database and files you sent.Also, the files you sent don't appear to be translated and still seem English to me. I also don't see the proper translations in the database either.When doing a translation it says to copy english_default.php to italian.php and then edit it using the translation tool which sounds like you have done.So I am not exactly sure what's going on because I see no translations and I get no errors when I try to order. But I am using MySQL 5.5.14.Perhaps you still have your language set to use the english.php file so can you please send all of your lang folder?Thank you!Ryan
I think I know what the problem is. I will update the dev snapshot with a fix and let you know when I do.
It appears that you probably haven't properly updated from the dev snapshot because this seems to already be fixed there.
Hello,Yes! I've followed exactly this passage and I can see the script translated in italian.I want to update my MySQL to the 5.5.14....I'll try again the Dev.Snap.
Hmm, well I don't see the script in italian so maybe you sent the wrong files and database or something. I don't know.But it worked fine for me with the files and database you did send with the code from the dev snapshot, eventhough they were not italian translations. I never tried the old code. I could see there is an italian language added but none of the things were italian anywhere in the files you sent.
I've sent to you the content of my lang folder now.
I've copied folder and files from the 2.1.r146 (Dev.Snap.) to my custom MillionDollarScript-2.0.15; but, when I copy the file MAIN.css, my example page looks disordered. And, another problem, I can't set English as default language; now I can work ONLY with Italian, or, in another words, when I set English, the script continue to "speak italian".No, to solve the syntax error I must update my MySQL version to 5.5.14.; I think this is the only way.
Well, [i]don't worry, be happy![/i] :) I've deleted all who I've created, with the Squalo database and Italian files translation. RESET AND RESTART.Now,I'm re-creating a new 200.000€ Page but in english and, obviously, with the last Dev. Snap.; I've configurated the payment method as PayPal and finally I've tested the pixel purchasing; surprise: the syntax error is disappeared!!!The script works completely and well!But, with the new Dev. Snap, the Example file is changed from the first version of the script (2.0.15). At the time, I've enabled the MAP and the pixel STATS, but now I need help to define the page with my elements, images and logo.The translation in italian can expect...Actual situation:http://img850.imageshack.us/img850/5190/situazioneinizialec.jpg
Hello,Excellent, I am glad you got it to work :)Yes, I have modified the main file a little bit so it's easier to customize. Sorry, I probably should have explained that better. I also updated the default look a bit. There is an index.php file instead of example.html by default and it contains some PHP code. You would have to modify this file rather than copy your old example.html file as the contents have changed some and I don't think it would work if you just copied your old file over top. Even the CSS is probably updated so you would have to merge your changes. However, it shouldn't really be that much work since there are minimal elements on the page in the first place. If you take a look at the index.php file you will see it includes the config.php and then echos some variables such as the logo url, site slogan, and you can put whatever other variables appear within config.php such as SITE_NAME or SITE_CONTACT_EMAIL for example. You might want to be careful about the email though due to spam bots. Those are probably all you would want to use from there.I can see in the image you linked that it looks like it's working. I can't really inspect the elements on the page to see where they are but if you have a link to your site I can try to help if you explain what you are trying to do exactly.Eventually I want to convert everything into a nice, neat framework so it will be much better to work with but this is a time consuming process. And each new version probably won't be 100% compatible with the last. But I will attempt to provide any upgrade instructions when I can, and help people who want to upgrade if they ask. I was hoping to have it done by now but this project has no funding and makes very little money and nobody donates and so it doesn't seem to be a priority so I just to do it on my absolute spare time. I have plenty of other projects on the go as well.I have considered using Joomla as a framework but then it went to Joomla 1.6 which wasn't very good. 1.7 has many bugs left in it. I have looked at some other frameworks and eventually just figured I would keep attempting to update this original code I was given but, no offense to the original author but I am sure they would admit, it is a bit messy and hard to update. So I have to completely rewrite a lot of things or start fresh and use a framework.
Yes! Now the page seems to be working, but in english; for me there are no problems to READ (I'm thinking at various italian customers... :whistle: ) english language, but to WRITE... I'm sure you can see it! :blush: In first, at the moment, my page is not online. I'm working offline, in localhost with XAMPP. So, unfortunately, I can't send to you any link.... at the moment. I hope I'm able to do it until the end of the year. :) Therefore, to dispose elements, logo, images and colors in my page, I am used to do it by the Example file with HTML; however I'm looking at the Index.Ryan, I'm sorry who your projects proceed slowly; I would like to make a donation. Your help is fundamental for the page who I'm creating.See you soon!
Well if you have the default language set and its all translated properly I believe it should work. It seemed to work in my testing anyway.You might also wish to change the html format to match however your language intends it to be.This appears near the top of the index.php file. As you can see it has en-US which you may want to change. [code][/code]Perhaps this bit could be replaced with a call to get_doc function which you also may want to change which has a similar thing. This is located in /includes/functions2.php in the get_doc function at the top.So it would look like this:[code]include_once ("config.php");echo $f2->get_doc(); ?>[/code]And maybe I could make the code within the functions2.php file properly use the language code entered into the language tool automatically so no editing of the code is necessary at all. Much work to do.Also, within /users/header.php and /users/footer.php is what the users will see when visiting the /users area if you want to customize that.
Okay Ryan, thanks for the instructions; I'm thinking to leave the english language as default, not a new translation in italian... I'll think about this decision soon.Thanks again.A question: I need to fix in the center of the page, above the map, the Home, Buy Pixels (Acquista blocchi), and FAQ (Le ragioni di questo sito) buttons; I've tried to modify the example file with the old tag , but nothing happens:[code]Home | Acquista Blocchi | Le ragioni di questo sito[/code]http://img705.imageshack.us/img705/1760/tocenter.jpg
The menu is not using the same format. It is using an unordered list format. You are trying to put the old code in the new template and so you are bound to run into problems with the CSS.Naturally, if you intend to modify HTML you should learn HTML first or you will have a whole lot of problems on your site.The new code with your menu would be this:[code]Home Acquista Blocchi Le ragioni di questo sito [/code]In the future there will be a menu editor of some sort, depending on the framework it eventually goes into.
So, I can modify ONLY the Index.php file omitting the Example or vice versa?
Well I suppose you could use either but PHP allows you to use your config variables in the file and include other code dynamically and whatnot.
No, I've deleted the Example.html; I'm working on the Index.php, but is very difficult because I don't know absolutely nothing of the PHP language.
I got past this error by removing the comment tag from line 244 in include/dynamic_forms.php