Y
Y
Youri_M4U2010-10-03 21:11:26
MySQL
Youri_M4U, 2010-10-03 21:11:26

Error in MySQL query when trying to make friends between DokuWiki and Wordpress

I'm trying to make friends between DokuWiki and Wordpress using this guide: thedeadone.net/download/getting-dokuwiki-to-use-wordpress-authentication/

At the stage of creating additional fields, MySQL swears 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 results in 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 'â€": This one results in

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;

"#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′,`gid` int(10) UNSIGNED NOT NULL DEFAULT ’0′, PRIMARY KEY (`uid`,`gid`' at line 1". I'm

not familiar with MySQL. I can't imagine where the error is. Please tell me.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Grigory Peretyaka, 2010-10-03
@Youri_M4U

Everything is fine with the requests - the problem is in the encoding, where are you passing these requests from?

A
AIVolkov, 2010-10-04
@AIVolkov

There are some tricky quotes around the string values ​​in the query, even compare visually: '0′ and '0'.
Most likely, they wanted to make it “beautifully” in the source.
After copy-paste, replace these quotes with regular ones, which are on the "E" key :)
Do not touch the quotes around the field names (for example, `uid`).
I checked it on my server - there was the same error, after replacing it - it worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question