https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× Welcome to the ToolsJX forum!


MySQL Field Names with Dashes

  • RoadHazard
  • RoadHazard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 2 months ago #259

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?

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #260

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

Please Log in or Create an account to join the conversation.

  • RoadHazard
  • RoadHazard's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 2 months ago #262

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.

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.146 seconds

Contact Us

Contact us on Discord

Contact us on Facebook