Mysql Error 1064 Phpmyadmin
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies error 1064 (42000): you have an error in your sql syntax; of this site About Us Learn more about Stack Overflow the company
1064 Mysql
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users
Mysql Error 1064 (42000)
Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a
You Have An Error In Your Sql Syntax Check The Manual That Corresponds To Your Mysql Server Version
minute: Sign up phpMyadmin - Error #1064 up vote 2 down vote favorite When trying to create this table in my db, I get an error: #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 'unsigned NOT NULL default '0', PRIMARY KEY (reminder_id), KEY #1064 - you have an error in your sql syntax reminder_id (rem' at line 5 CREATE TABLE reminder_events ( reminder_id bigint(20) unsigned NOT NULL auto_increment, reminder_name varchar(255) NOT NULL default '', reminder_desc text, reminder_date varchar(8) unsigned NOT NULL default '0', PRIMARY KEY (reminder_id), KEY reminder_id (reminder_id) ) TYPE=MyISAM; Can anyone see what I'm doing wrong? mysql phpmyadmin mysql-error-1064 share|improve this question edited Jan 13 '11 at 10:58 ajreal 36.7k85899 asked Jan 13 '11 at 10:34 En-Motion 30421025 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted The problem is that you're trying to define a text field (varchar) as being unsigned, which is something that can only apply to a numerical field. i.e.: "reminder_date varchar(8) unsigned NOT NULL default '0'," makes no sense. However, as the field is called "reminder_date", I'm guessing you're attempting to store a date, in which case you really want to use MySQLs DATE field type. e.g.: "reminder_date DATE NOT NULL," Additionally, if you're going to want to search on any of these fields, you should also add some indexes to speed up the searches. So, if you wanted to be able t
here for a quick overview of the site Help Center Detailed answers to any questions you might check the manual that corresponds to your mysql server version for the right syntax to use near '$$' have Meta Discuss the workings and policies of this site About mysql server version for the right syntax to use near '' at line 1 Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads #1064 phpmyadmin with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million http://stackoverflow.com/questions/4679080/phpmyadmin-error-1064 programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Creating tables in PhpMyAdmin - error 1064 up vote 0 down vote favorite The code: delimiter $$ CREATE TABLE "login" ( "IdUser" int(11) NOT NULL AUTO_INCREMENT, "username" varchar(45) CHARACTER SET latin1 NOT NULL, "pass" varchar(45) CHARACTER SET latin1 NOT NULL, http://stackoverflow.com/questions/18005685/creating-tables-in-phpmyadmin-error-1064 PRIMARY KEY ("IdUser") ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8$$ CREATE TABLE "photos" ( "IdPhoto" int(11) NOT NULL AUTO_INCREMENT, "title" varchar(100) CHARACTER SET latin1 NOT NULL, "IdUser" int(11) NOT NULL, PRIMARY KEY ("IdPhoto") ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8$$ Errors: #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 '"login" ( "IdUser" int(11) NOT NULL AUTO_INCREMENT, "username" varchar(45)' at line 1 #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 '"photos" ( "IdPhoto" int(11) NOT NULL AUTO_INCREMENT, "title" varchar(100)' at line 1 Any ideas? I'm brand new to this so any help would be very much appreciated. Thank you. mysql sql table phpmyadmin share|improve this question edited Aug 1 '13 at 22:46 peterm 57.5k56277 asked Aug 1 '13 at 22:25 Matt Walker 111 add a comment| 3 Answers 3 active oldes
Extensions Demos Logo Documentation Take the Tour Tutorials Class Reference Wiki Guide 2.0 Class Reference 2.0 Screencasts Resources Development http://www.yiiframework.com/forum/index.php/topic/24958-solved-mysql-error-1064-sql-syntax/ Contribute to Yii Latest Updates Report a Bug Report a Security Issue Community Forum Live Chat News Hall of Fame Badges search Yii Framework Forum: [SOLVED] mySQL Error #1064 - SQL syntax - Yii Framework Forum Jump to content Sign In » New user? Register Now! Help Search Advanced ForumsMembers Yii error 1064 Framework Forum > Archives > Agile Web Application Development with Yii1.1 and PHP5 View New Content Page 1 of 1 You cannot start a new topic This topic is locked [SOLVED] mySQL Error #1064 - SQL syntax pp 96 97 single quotes vs backquotes for CREATE TABLE #1 windsor Junior Member you have an Group: Members Posts: 63 Joined: 04-October 11 Location:Tampa, FL Posted 21 October 2011 - 03:48 PM Getting this error: #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 ''tbl_project_user_assignment' ( 'project_id' Int(11) NOT NULL, 'user_id' Int(11)' at line 1 When trying to import this SQL statement using phpMyAdmin and mySQL CREATE TABLE IF NOT EXISTS 'tbl_project_user_assignment' ( 'project_id' Int(11) NOT NULL, 'user_id' Int(11) NOT NULL, 'create_time' DATETIME, 'create_user_id' INTEGER, 'update_time' DATETIME, 'update_user_id' INTEGER, PRIMARY KEY ('project_id','user_id') ) ENGINE = InnoDB ; What worked for me is to change the single quotes to back quotes like below: CREATE TABLE IF NOT EXISTS `tbl_project_user_assignment` ( `project_id` Int(11) NOT NULL, `user_id` Int(11) NOT NULL, `create_time` DATETIME, `create_user_id` INTEGER, `update_time` DATETIME, `update_user_id` INTEGER, PRIMARY KEY (`project_id`,`user_id`) ) ENGINE = InnoDB ; I don't know why this worked, bu