MySQL Error: INSERT INTO ms_views(tipo, id_post, count, fecha) SELECT 'pelicula', '12153', 1, '2019-03-22' FROM dual WHERE NOT EXISTS (SELECT * FROM ms_views WHERE id_post='12153' AND fecha = '2019-03-22')