Ver original$query = "INSERT INTO Tags SELECT '$tagsimple' FROM (SELECT NULL) d WHERE NOT EXISTS (SELECT NULL FROM Tags WHERE Tag = '$tagsimple');