MySQL Field Names with Dashes
(1 viewing) (1) Guest
 | | |
|
TOPIC: MySQL Field Names with Dashes
|
|
MySQL Field Names with Dashes 4 Weeks, 1 Day ago
|
Karma: 0
|
|
It appears TableJX doesn't like MySQL database field names with dashes/hyphens in them.
I spent several hours debugging one table that wouldn't display any data at all, while other tables displayed okay.
The problem was a dash (- hyphen character) in the field name. I used phpMyAdmin to replace it with an underscore (_ character) and it worked okay after that.
Maybe something to add to the list for the next revision?
|
|
|
|
|
|
|
Re:MySQL Field Names with Dashes 4 Weeks ago
|
Karma: 1
|
|
You should avoid using dashes in column names also according to many books about DBs.
Joe Celko - SQL For Smarties (page 6)
"Standard SQL allows you to use spaces, reserved words, and
special characters in a name if you enclose them in double
quotation marks, but this should be avoided as much as
possible."
There are several reasons, just one could be:
select a-b
from table
- (minus) is normally used for operator
Best regrads,
Viljem
|
|
|
|
|
|
|
Re:MySQL Field Names with Dashes 4 Weeks ago
|
Karma: 0
|
|
Good advice. It's just not the way my data happened to be delivered, and it took awhile to figure out the problem.
It might be useful to make a note in the documentation that dashes are not supported/recommended by TableJX and must be changed, even if your MySQL database does support them.
|
|
|
|
|
|
|
 | | |
TableJX, Powered by ; by SG