Plugin Author
Bob
(@prasunsen)
I can’t see why you would be getting error. Is the whole query shown in the log?
Hello, thanks for your quick reply,
sorry i have not copied the complete error message because i don´t know if the error message contains private details from the server etc.
Here is the complete error message from the apache error log:
[Wed May 13 10:30:59 2020] [notice] WordPress-Datenbank-Fehler 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 ‘rank=0, title=’Test’, autocontinue=0, sort_order=1, \n\t\t\taccept_comments=0, accep’ at line 2 f\xc3\xbcr Abfrage INSERT INTO gowp_chained_questions SET\n\t\t\tquiz_id=1, question=’Test text’, qtype=’checkbox’, rank=0, title=’Test’, autocontinue=0, sort_order=1, \n\t\t\taccept_comments=0, accept_comments_label=’Your comments:’ von do_action(‘admin_page_chainedquiz_questions’), WP_Hook->do_action, WP_Hook->apply_filters, ChainedQuizQuestions::manage, ChainedQuizQuestions::add_question, ChainedQuizQuestion->add
If there are any details, that should not be public please tell me about it and i remove the details.
Thanks for your help!
Plugin Author
Bob
(@prasunsen)
Sorry, absolutely no idea why the query is causing error except maybe these characters that show up: “\n\t\t\t”.
Hello,
thank you for your reply.
I have searched a lot (and unfortunatly i don´t know much about mySQL or the syntax), but i have not found a solution. These characters \n\t\t\t are only new line and tabulator that is in your plugin code. Is it unusual that these characters show up in the apache error log?
I dont know, if this could be because the website and wordpress is in german? Maybe there are any false character sets with the mySQL database?
I use mySQL 8.0.15
PHP 7.3
Wordpress 5.4.1
This is no multisite
mySQL uses utf8mb4
Have you a hint for me?
Is it ok for you, if i post this error (with the function of code the error shows) on stackoverflow or so, perhaps i can get there a hint for a solution?
Is there anything i can change on the database to solve the problem?
Thank you for your help!
Best regards
Plugin Author
Bob
(@prasunsen)
Yes, you can post it to stackoverflow.
Unfortunately I have no idea what’s wrong. We have users in many languages, there are no language specific problems.
Hello,
i think i found the syntax “error”.
rank() is a function in SQL ( new in version 8), as you can read here . So the plugin would work with a different name than rank for the question rank.
I hope I’m not too brazen when I ask you if you could change the name ‘rank’? Or has it been possible by the license that I change only in my installation? And if i can change it on my installation is there any other problem that a new name for ‘rank’ could cause?
p.s.: I have not posted to stackoverflow.
Thanks again and best regards
Hello,
if I change the name “rank” to another name, could there be other problems? I would rename the name in basic.php and question.php before activating the plugin.
Should this be possible without any problems?
Best Regards