whats this error about ??
Posted: Sun Apr 01, 2007 2:09 am
Hello forums!!
I tried to insert following query in the table called user_table
I got the following errors(in Phpmyadmin):
Error
I am unable to figure out the problems
Please help!!
Thanks in advance to all of you.[/syntax]
I tried to insert following query in the table called user_table
Code: Select all
INSERT INTO user_table (id,username,realname,email,password,date_created)
VALUES
('','user1','user name','user1@localhost','1a1dc91c907325c69271ddf0c944bc72',now())Error
My table structure is:SQL query:
INSERT INTO mantis_user_table( id, username, realname, email,
PASSWORD , date_created )
VALUES (
'', 'user1', 'user 111', 'rajen@localhost1', '1a1dc91c907325c69271ddf0c944bc72', now( )
)
MySQL said: Documentation
#1062 - Duplicate entry '' for key 2
Code: Select all
CREATE TABLE `user_table` (
`id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(32) collate latin1_general_ci NOT NULL default '',
`realname` varchar(64) collate latin1_general_ci NOT NULL default '',
`email` varchar(64) collate latin1_general_ci NOT NULL default '',
`password` varchar(32) collate latin1_general_ci NOT NULL default '',
`date_created` datetime NOT NULL default '1970-01-01 00:00:01',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_user_cookie_string` (`cookie_string`),
UNIQUE KEY `idx_user_username` (`username`),
KEY `idx_enable` (`enabled`),
KEY `idx_access` (`access_level`)
);Please help!!
Thanks in advance to all of you.[/syntax]