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.

 

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

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.

Archived

This topic is now archived and is closed to further replies.

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