No biggy.
Here is the information you asked for.
Users table:
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`alias` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`date` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `alias` (`alias`,`email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Theres only one row in the users table, which is me.
INSERT INTO users (alias, email, password, date)
VALUES ("ybh", "email@email.com", "password", NOW())
help table:
CREATE TABLE IF NOT EXISTS `help` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userid` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`help` varchar(4000) NOT NULL,
`date` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
KEY `userid` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
When I try to do an INSERT in help it gives me the error message.
INSERT INTO HELP (userid, title, message, DATE)
VALUES (1, "The title", "The content!", NOW())
thanks
EDIT:
Not sure if you need this:
ALTER TABLE `help`
ADD FOREIGN KEY ( `userid` )
REFERENCES `dummy`.`users` (`id`);