0

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 'charset utf8 not null auto_increment index key, toId int(11) charset utf8 not ' at line 1

This error i am getting when creating a table, USING the SQLBuddy interface..

follows:
  id (primary key, autoincrement,utf8) - int(11)
  toId (utf8) - int(11)
  fromId (utf8) - int(11)

enter image description here

question is: why?

Toni Michel Caubet
  • 19,333
  • 56
  • 202
  • 378

1 Answers1

1

Can you remove the "utf8" settings from the 3 int columns?

ypercubeᵀᴹ
  • 113,259
  • 19
  • 174
  • 235
  • 1
    This should be a comment unless you are prepared to assert that that is the problem. – Jim Garrison Mar 01 '12 at 00:37
  • As it turns out this is quite likely the problem. `charset` is valid only on `char`, `varchar` and `text` columns. – Jim Garrison Mar 01 '12 at 00:40
  • @JimGarrison: sometimes I get a strange error and cannot add comments nor load the incoming messages (responses) nor logout. While other site functions work ok, like answering or editing an answer (but not deleting!). – ypercubeᵀᴹ Mar 01 '12 at 01:01
  • 1
    @ypercube if you can reliably replicate the problem you should probably report it on [meta] – Jim Garrison Mar 01 '12 at 01:40