Jump to content
  • 0

MySQL syntax error accessing table 'char'


Gedankenthank

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  06/20/14
  • Last Seen:  

I cannot access the table 'char' in mysql due to char being a command within sql. It keeps giving me a syntax error, even though I know the syntax is right because I can replace 'char' with any other table and it works fine. I've confirmed the table 'char' does exist.

 

This came about because my client keeps disconnecting when trying to create a character. I tried manually creating one in the terminal but ran into this problem. Does anyone know how to get around this? I can't seem to find any info on it.

 

I'm running Ubuntu 14.04 with the mysql 5.5.

 

Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  141
  • Reputation:   45
  • Joined:  08/14/12
  • Last Seen:  

Put backticks (`) around it, so it looks like this

SELECT * FROM `char`
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  4
  • Reputation:   0
  • Joined:  06/20/14
  • Last Seen:  

Awesome that works! Thanks!

 

The characters I tried to create are correctly in the database, so my client crashing was unrelated.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...