Error in MySQL query when you try to make friends with DokuWiki and Wordpress


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
22 views
Try to make friends with DokuWiki and Wordpress in this guide: thedeadone.net/download/getting-dokuwiki-to-use-wordpress-authentication/

At the stage of creating extra fields MySQL complains at invalid syntax.

CREATE TABLE `wp_dw_groups` (`gid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,`name` varchar(50) NOT NULL DEFAULT ”,PRIMARY KEY (`gid`),UNIQUE KEY `name` (`name`)) TYPE = MYISAM;

This query causes the 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 'â€":

CREATE TABLE `wp_dw_usergroup` (`uid` int(10) UNSIGNED NOT NULL DEFAULT '0',`gid` int(10) UNSIGNED NOT NULL DEFAULT '0',PRIMARY KEY (`uid`,`gid`)) TYPE = MYISAM;

And this — to "#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 '’0€2,`gid` int(10) UNSIGNED NOT NULL DEFAULT ’0€2,PRIMARY KEY (`uid`,`gid` at line 1".

Not familiar with MySQL. Where error is not present. Tell me, please.
by | 22 views

2 Answers

0 like 0 dislike
Queries everything is fine — the problem is in the encoding, where you submit these requests?
by
0 like 0 dislike
In the query some clever quotes around string values, compare visually: '0' and '0'.
This is most likely the source wanted to make "beautiful".
\r
After copy-paste and replace these quotes in normal that on the key "e" :)
Quotes around the field names (e.g. `uid`) — do not touch.
\r
Checked on their server had the same error, after replacement worked.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
asked Mar 27, 2019 by Ichi
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
25,689 users