Jump to content

[SOLVED] MySQL Requiring ``'s around table names?


SevenEcks

Recommended Posts

I have just transferred from one host with MySQL 5.0.32 to one with 5.0.51a-community.  I was able to upload my database without a hitch and can browse around it with PHPMyAdmin.  However, the site itself does not work because MySQL is returning an error on all queries.  (All tables are MyISAM/utf8_unicode_ci)

 

I have found that it is the following:

 

It requires table names to be surrounded by `'s.  So..

 

select * from `tablename`

 

instead of just:

 

select * from tablename

 

I have been unable to find any information on this.  I want to disable whatever this feature is. Any help would be much appreciated, thanks.

 

Link to comment
Share on other sites

It sure would help if you provided an actaul example of one of your table names so that we can see what might be going on.

 

From the mysql manual -

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. The set of alphanumeric characters from the current character set, “_”, and “$” are not special. Reserved words are listed at Section 8.3, “Reserved Words”.
Link to comment
Share on other sites

I have been unable to find any information on this.  I want to disable whatever this feature is.

It's not a "feature"... and it's mandatory because MySQL allows reserved characters and keywords everywhere.  Just don't use it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.