特别是在PHPMyAdmin上下文中,我找不到任何可行的答案。
我收到此错误
MySQL说:文档
2013-查询期间与MySQL服务器的连接断开
运行以下查询后:
-- Deleting all duplicate products in wp_posts table
DELETE FROM wp_posts
WHERE post_type = 'Product' AND id NOT IN (SELECT x.minid FROM (SELECT p.post_title, MIN(p.ID) as minid, m.meta_value
FROM
wp_postmeta m
INNER JOIN wp_posts p
ON p.id = m.post_id
AND p.post_type = 'Product'
WHERE
m.meta_key = '_regular_price'
AND NOT EXISTS (
SELECT 1
FROM
wp_postmeta m1
INNER JOIN wp_posts p1
ON p1.id = m1.post_id
AND p1.post_type = 'Product'
WHERE
m1.meta_key = '_regular_price'
AND p1.post_title = p.post_title
AND m1.meta_value < m.meta_value
)
GROUP BY p.post_title, m.meta_value) x
);
-- Deleting all corresponding wp_postmeta.post_ids that don't have a match in wp_posts.id after the duplicate deletion above
DELETE pm
FROM wp_postmeta pm
WHERE post_id IN (SELECT post_id
FROM (SELECT post_id
FROM wp_postmeta pm
LEFT JOIN wp_posts p
ON p.id = pm.post_id
WHERE p.id IS NULL
AND p.post_type = "product") i);
PHPMyAdmin中是否可以进行更改以使此错误消失?我以前从未得到过,并且已经运行了一些非常大的查询。