gupta12 Posted January 24, 2012 Share Posted January 24, 2012 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 More sharing options...
premiso Posted January 24, 2012 Share Posted January 24, 2012 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. Link to comment https://forums.phpfreaks.com/topic/255668-problems-after-upgrade-please-help/#findComment-1310677 Share on other sites More sharing options...
fenway Posted January 24, 2012 Share Posted January 24, 2012 In fact, don't use any fancy editor at all -- it's just text. Link to comment https://forums.phpfreaks.com/topic/255668-problems-after-upgrade-please-help/#findComment-1310682 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.