I am trying to insert record into wordpress tables but the problem is, its inserting duplicate records.
This is my sql query
$qv = $conn->query("INSERT INTO wp_posts (post_title, post_content, post_name, post_date, post_date_gmt, post_author) VALUES('$title[$i]', '$description[$i]', '$url[$i]', '$date[$i]', '$postdate[$i]', '$author[$i]') ON DUPLICATE KEY UPDATE post_name = post_name");
I don't want to insert any duplicate records, how to fix this?