Hi guys,
I got help from here with the query below and it works like a dream...
However now I would like something like that but for two unique keys... Is it possible...
the table looks like this:
ID movie_id user_id comment
So I would like to enter new entry but if there is already comment for that movie from that particular user then update. Is it possible?
Thanks
INSERT INTO tbl_movies_genre
(tbl_movies_genre.movie_id, tbl_movies_genre.movie_genre)
VALUES ('movieID', 'movieGenre')
ON DUPLICATE KEY UPDATE tbl_movies_genre.movie_genre ='movieGenre ';
I got help from here with the query below and it works like a dream...
However now I would like something like that but for two unique keys... Is it possible...
the table looks like this:
ID movie_id user_id comment
So I would like to enter new entry but if there is already comment for that movie from that particular user then update. Is it possible?
Thanks
INSERT INTO tbl_movies_genre
(tbl_movies_genre.movie_id, tbl_movies_genre.movie_genre)
VALUES ('movieID', 'movieGenre')
ON DUPLICATE KEY UPDATE tbl_movies_genre.movie_genre ='movieGenre ';