Link to home
Create AccountLog in
Avatar of starview
starview

asked on

Error in Creating a table in myphpadmin

Can someone tell me where my error is and how and what to change it to, so I don't have the error?

Error

SQL query:

- CREATE TABLE `tbl_user` (
`user_id` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`user_name` varchar( 20 ) NOT NULL default '',
`user_password` varchar( 32 ) NOT NULL default '',
`user_regdate` datetime NOT NULL default '0000-00-00 00:00:00',
`user_last_login` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY ( `user_id` ) ,
UNIQUE KEY `user_name` ( `user_name` )
) TYPE = MYISAM AUTO_INCREMENT =4;

MySQL said: Documentation
#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 '-
CREATE TABLE `tbl_user` (
  `user_id` int(10) unsigned NOT NULL auto_increme' at line 1
Avatar of edtechdba
edtechdba
Flag of United States of America image

This looks like a very similar issue to yours (almost the same!), and there was a solution posted.
http://stackoverflow.com/questions/4639788/sql-create-table-error

I could post what's inside the link, but in the interest of time, it may be faster for you to check it out.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of starview
starview

ASKER

Thank you, it worked fine.