Error en la base de datos de WordPress: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND tm.meta_key = 'order'
AND tt.taxonomy = 'product_cat' ' at line 29]SELECT tr.object_id, tt.taxonomy, tt.term_id, t.name, tt.parent, count(*) as total
FROM ikn_term_relationships AS tr
JOIN ikn_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
JOIN ikn_terms AS t ON tt.term_id = t.term_id
JOIN ikn_termmeta AS tm ON tr.term_taxonomy_id = tm.term_id
WHERE tr.object_id IN (
SELECT p.ID
FROM ikn_posts AS p
INNER JOIN ikn_term_relationships AS tr ON p.ID = tr.object_id
INNER JOIN ikn_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
LEFT JOIN (
SELECT tr2.object_id
FROM ikn_term_relationships AS tr2
INNER JOIN ikn_term_taxonomy AS tt2 ON tr2.term_taxonomy_id = tt2.term_taxonomy_id
WHERE tt2.taxonomy = 'product_visibility'
AND tt2.term_id IN (7, 6, 9, 10, 11, 12)
) AS excluded_visibility ON p.ID = excluded_visibility.object_id
INNER JOIN ikn_postmeta AS pm ON p.ID = pm.post_id
WHERE p.post_type = 'product'
AND p.post_status = 'publish'
AND (excluded_visibility.object_id IS NULL)
AND pm.meta_key = '_stock_status'
AND pm.meta_value = 'instock'
)
-- AND tm.meta_key = 'order'
AND tt.term_id IN ()
AND tm.meta_key = 'order'
AND tt.taxonomy = 'product_cat' GROUP BY t.term_id ORDER BY tm.meta_value+0 ASC