@pixelpadre,
You can catch more flies with honey than with vinegar.
Yes, MySQL table- and field-names
can contain a hyphen (and other non-alphanumeric and underscore) characters, but that usage requires the consistent use of backticks (`) around those non-standard names. However, the Zen Cart back (as well as 99.99% of the plugins) don't backtick consistently; that's why you ran across that issue using a hyphen in your database prefix.
From
https://dev.mysql.com/doc/refman/8.0...ntifiers.html:
An identifier may be quoted or unquoted. If an identifier contains special characters or is a reserved word, you
must quote it whenever you refer to it. (Exception: A reserved word that follows a period in a qualified name must be an identifier, so it need not be quoted.) Reserved words are listed at
Section 9.3, “Keywords and Reserved Words”.
Internally, identifiers are converted to and are stored as Unicode (UTF-8). The permissible Unicode characters in identifiers are those in the Basic Multilingual Plane (BMP). Supplementary characters are not permitted. Identifiers thus may contain these characters:
- 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.
- Beginning with MySQL 8.0.32, use of the dollar sign as the first character in the unquoted name of a database, table, view, column, stored program, or alias is deprecated and produces a warning. This includes such names used with qualifiers (see Section 9.2.2, “Identifier Qualifiers”). The dollar sign can still be used as the leading character of such an identifier when it is quoted according to the rules given later in this section.
Bookmarks