MySQL Error when enabling “Search Meta” Option
-
I get the following error thrown when enabling the meta search feature:
WordPress-Datenbank-Fehler:?[Not unique table/alias: 'bsq_meta']
SELECT DISTINCT (MATCH(wp_posts.post_title) AGAINST ('opera' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('opera' ) * 1 ) as score FROM wp_posts LEFT JOIN wp_postmeta AS bsq_meta ON (wp_posts.ID = bsq_meta.post_id) LEFT JOIN wp_postmeta AS bsq_meta ON (wp_posts.ID = bsq_meta.post_id) WHERE 1=1 AND ( wp_posts.post_date <= '2024-07-16 15:35:56' ) AND ((MATCH(wp_posts.post_title) AGAINST ('opera' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('opera' ) * 1 ) OR ( ((wp_posts.post_excerpt LIKE '%opera%') OR (bsq_meta.meta_value LIKE '%opera%')) ) ) AND (wp_posts.post_password = '') AND wp_posts.post_type IN ('post', 'page', 'video') AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'inherit')) ORDER BY score DESC LIMIT 0,1
this error gets displayed two times on the search page, then this error appears:
WordPress-Datenbank-Fehler:?[Not unique table/alias: ‘bsq_meta’]
SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*,wp_posts.ID as ID, (MATCH(wp_posts.post_title) AGAINST ('opera' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('opera' ) * 1 ) as score,wp_posts.ID as ID, (MATCH(wp_posts.post_title) AGAINST ('opera' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('opera' ) * 1 ) as score FROM wp_posts LEFT JOIN wp_postmeta AS bsq_meta ON (wp_posts.ID = bsq_meta.post_id) LEFT JOIN wp_postmeta AS bsq_meta ON (wp_posts.ID = bsq_meta.post_id) WHERE 1=1 AND ( wp_posts.post_date <= '2024-07-16 15:35:56' ) AND ((MATCH(wp_posts.post_title) AGAINST ('opera' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('opera' ) * 1 ) OR ( ((wp_posts.post_excerpt LIKE '%opera%') OR (bsq_meta.meta_value LIKE '%opera%')) ) ) AND (wp_posts.post_password = '') AND wp_posts.post_type IN ('post', 'page', 'video') AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'inherit')) ORDER BY (MATCH(wp_posts.post_title) AGAINST ('opera' ) * 10 ) + (MATCH(wp_posts.post_content) AGAINST ('opera' ) * 1 ) DESC LIMIT 0, 10
- You must be logged in to reply to this topic.