我想從我的WordPress網站 刪除重複的職位選擇重複的崗位工作currectlly刪除重複的帖子在WordPress
SELECT a.ID, a.post_title, a.post_type, a.post_status
FROM wp_posts AS a
INNER JOIN (
SELECT post_title, MIN(id) AS min_id
FROM wp_posts
WHERE post_type = 'post'
AND post_status = 'publish'
GROUP BY post_title
HAVING COUNT(*) > 1
) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = 'post'
AND a.post_status = 'publish'
和
this query that i need has error
DELETE a.*
FROM wp_posts AS a
INNER JOIN (
SELECT post_title, MIN(id) AS min_id
FROM wp_posts
WHERE post_type = 'post'
AND post_status = 'publish'
GROUP BY post_title
HAVING COUNT(*) > 1
) AS b ON b.post_title = a.post_title
AND b.min_id <> a.id
AND a.post_type = 'post'
AND a.post_status = 'publish'
這是錯誤消息:
意外標記(接近a)意外標記(接近。)意外標記 (接近*)
請標記正確使用的RDBMS .....語法可能會有所不同? – Susang