From MySQL reference:
- Permitted characters in unquoted identifiers:
- ASCII:
[0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)- Extended: U+0080 .. U+FFFF
- Permitted characters in quoted
identifiers include the full Unicode Basic Multilingual Plane (BMP),
except U+0000:
- ASCII: U+0001 .. U+007F
- Extended: U+0080 ..
U+FFFF- ASCII NUL (U+0000) and supplementary characters
(U+10000 and higher) are not permitted in quoted or unquoted
identifiers.- Identifiers may begin with a digit but unless quoted
may not consist solely of digits.- Database, table, and column
names cannot end with space characters.
So you have to remove -
characters from the names of columns or quote these names.
It’s worth to mention that it would be a good idea to use the same naming conventions that WP is using. So table names should be lower-case and use _
as separator.