Jump to content

Problems after upgrade-Please help!


gupta12

Recommended Posts

PHP Version : 5.3.6 MySql Version: 5.1.55

 

I recently upgraded my PHP and Mysql versions to above. Now, I am having problems running even simple sql commands through PhpMyadmin. Is it a problem with PhpMyadmin for these versions and I should use some another tool to upload my database tables…if so, which one, ... Please help!

For eg.

Create table db.t (f1 enum (‘a’, ‘b’) not null);

go

RESULT:

There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem

ERROR: Unclosed quote @ 34

STR: '

SQL: CREATE TABLE `db`.`t` (`f1` ENUM(\'a\',\'b\') NOT NULL) ENGINE = MyISAM

 

SQL query:

CREATE TABLE `db`.`t` (`f1` ENUM(\'a\',\'b\') NOT NULL) ENGINE = MyISAM

MySQL said: 

#1064 - 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 '\'a\',\'b\') NOT NULL) ENGINE = MyISAM' at line 1

17417_.doc

Link to comment
https://forums.phpfreaks.com/topic/255668-problems-after-upgrade-please-help/
Share on other sites

This line you posted:

 

Create table db.t (f1 enum (‘a’, ‘b’) not null);

 

Those are smart quotes in the enum section. Change them to be regular single quotes:

Create table db.t (f1 enum ('a', 'b') not null);

 

The smart quotes seem to be coming from your word document (as that is probably the most common place), it is best to turn them off in M$ Word if you plan to keep using that, as the smart quotes really do nothing special other than look pretty. You could also use an actual IDE / Programing application to create SQL's. M$ Word is not ideal for writing code / queries because it uses a lot of special characters that can break code. So either turn it off (some where in the auto-complete section I think for m$), paste the code in notepad and re-copying then pasting into the text box, or use an actual editor meant for SQL etc.

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.