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