Reputation: 45
I have a big problem with phpmyadmin,
I have two tables where I want to add a status message like Facebook.
My first table I have ID, username and password
and in my second I have id, status message, thumbs up, thumbs down.
Now I want when adding a "status message" I'll send the id of the foreign key from the user.
But I get only error of this kind:
# 1062 - Duplicate entry '87 'for key' PRIMARY '
kit that I try to write the
INSERT INTO `notes` (`id`, `note`) VALUES ("87", "hello")
Also good to know is that my database is already a post from id = 87 but want to be able to have more.
Upvotes: 0
Views: 1054
Reputation: 37233
Try just this, if the id is auto increment, you don't have to make it:
INSERT INTO `notes` ( `note`) VALUES ("hello")
Upvotes: 2