WordPress database error: [Unknown column 'products.post_title' in 'order clause']SELECT
manuals.ID as id,
manuals.post_title as manual_name,
/*----------------------------------
| PDF
+---------------------------------*/
(SELECT
CONCAT(guid,'||',post_title)
FROM
wp_posts
WHERE ID = (
SELECT meta_value FROM wp_postmeta WHERE post_id = manuals.ID AND meta_key = 'manual_pdf' LIMIT 1
) LIMIT 1) as pdf_vars,
/*----------------------------------
| Category
+---------------------------------*/
(SELECT category.name FROM wp_terms AS category JOIN wp_term_taxonomy ON wp_term_taxonomy.parent = category.term_id AND wp_term_taxonomy.term_id IN (
SELECT subcategory.term_id FROM wp_terms AS subcategory WHERE subcategory.term_id IN (
SELECT wp_term_taxonomy.term_id FROM wp_term_taxonomy JOIN wp_term_relationships ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id AND wp_term_relationships.object_id IN (
SELECT products.ID FROM wp_posts AS products WHERE post_type='product' AND products.ID IN(
SELECT meta_value FROM wp_postmeta WHERE meta_key ='manual_products' AND wp_postmeta.post_id = manuals.ID
)
)
)
)) AS category_name,
/*----------------------------------
| Subcategory
+---------------------------------*/
(SELECT subcategory.name FROM wp_terms AS subcategory WHERE subcategory.term_id IN (
SELECT wp_term_taxonomy.term_id FROM wp_term_taxonomy JOIN wp_term_relationships ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id AND wp_term_relationships.object_id IN (
SELECT products.ID FROM wp_posts AS products WHERE post_type='product' AND products.ID IN(
SELECT meta_value FROM wp_postmeta WHERE meta_key ='manual_products' AND wp_postmeta.post_id = manuals.ID
)
)
WHERE wp_term_taxonomy.taxonomy ='product-category'
)) AS subcategory_name,
/*----------------------------------
| Taxonomy
+---------------------------------*/
(SELECT GROUP_CONCAT(DISTINCT name SEPARATOR ', ')
FROM wp_terms
WHERE term_id IN (
SELECT term_id FROM wp_term_taxonomy WHERE term_taxonomy_id IN (
SELECT term_taxonomy_id FROM wp_term_relationships WHERE object_id = manuals.ID AND taxonomy = 'manual-taxonomy'
)
)) as type_name,
(SELECT GROUP_CONCAT(DISTINCT products.post_title SEPARATOR ', ') FROM wp_posts AS products WHERE products.ID IN (
SELECT meta_value FROM wp_postmeta WHERE post_id = manuals.ID AND meta_key = 'manual_products' AND products.ID IN(
/*----------------------------------
| Product Visibility
+---------------------------------*/
SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN(
SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE taxonomy = 'product-visibility' AND term_id IN(
SELECT term_id FROM wp_terms WHERE wp_terms.slug IN('support-web-site','manuals-only')
)
)
)
)) as products,
/*----------------------------------
| Regions
+---------------------------------*/
(SELECT GROUP_CONCAT(DISTINCT name SEPARATOR ', ')
FROM wp_terms
WHERE term_id IN (
SELECT term_id FROM wp_term_taxonomy WHERE term_taxonomy_id IN (
SELECT term_taxonomy_id FROM wp_term_relationships WHERE object_id = manuals.ID AND taxonomy = 'region'
)
)) as regions,
/*----------------------------------
| Languages
+---------------------------------*/
(SELECT GROUP_CONCAT(DISTINCT name SEPARATOR ', ')
FROM wp_terms
WHERE term_id IN (
SELECT term_id FROM wp_term_taxonomy WHERE term_taxonomy_id IN (
SELECT term_taxonomy_id FROM wp_term_relationships WHERE object_id = manuals.ID AND taxonomy = 'language'
)
)) as languages
FROM
wp_posts as manuals
WHERE
manuals.post_type = 'manual' AND EXISTS (
SELECT 1
FROM wp_term_relationships
JOIN wp_term_taxonomy ON wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id
AND wp_term_taxonomy.taxonomy = 'language'
AND wp_term_taxonomy.term_id = '6551'
WHERE wp_term_relationships.object_id = manuals.ID
)
GROUP BY
manuals.ID
ORDER BY
products.post_title ASC
LIMIT 0,20
WordPress database error: [Unknown column 'products.post_title' in 'order clause']SELECT
manuals.ID as id,
manuals.post_title as manual_name,
/*----------------------------------
| PDF
+---------------------------------*/
(SELECT
CONCAT(guid,'||',post_title)
FROM
wp_posts
WHERE ID = (
SELECT meta_value FROM wp_postmeta WHERE post_id = manuals.ID AND meta_key = 'manual_pdf' LIMIT 1
) LIMIT 1) as pdf_vars,
/*----------------------------------
| Category
+---------------------------------*/
(SELECT category.name FROM wp_terms AS category JOIN wp_term_taxonomy ON wp_term_taxonomy.parent = category.term_id AND wp_term_taxonomy.term_id IN (
SELECT subcategory.term_id FROM wp_terms AS subcategory WHERE subcategory.term_id IN (
SELECT wp_term_taxonomy.term_id FROM wp_term_taxonomy JOIN wp_term_relationships ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id AND wp_term_relationships.object_id IN (
SELECT products.ID FROM wp_posts AS products WHERE post_type='product' AND products.ID IN(
SELECT meta_value FROM wp_postmeta WHERE meta_key ='manual_products' AND wp_postmeta.post_id = manuals.ID
)
)
)
)) AS category_name,
/*----------------------------------
| Subcategory
+---------------------------------*/
(SELECT subcategory.name FROM wp_terms AS subcategory WHERE subcategory.term_id IN (
SELECT wp_term_taxonomy.term_id FROM wp_term_taxonomy JOIN wp_term_relationships ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id AND wp_term_relationships.object_id IN (
SELECT products.ID FROM wp_posts AS products WHERE post_type='product' AND products.ID IN(
SELECT meta_value FROM wp_postmeta WHERE meta_key ='manual_products' AND wp_postmeta.post_id = manuals.ID
)
)
WHERE wp_term_taxonomy.taxonomy ='product-category'
)) AS subcategory_name,
/*----------------------------------
| Taxonomy
+---------------------------------*/
(SELECT GROUP_CONCAT(DISTINCT name SEPARATOR ', ')
FROM wp_terms
WHERE term_id IN (
SELECT term_id FROM wp_term_taxonomy WHERE term_taxonomy_id IN (
SELECT term_taxonomy_id FROM wp_term_relationships WHERE object_id = manuals.ID AND taxonomy = 'manual-taxonomy'
)
)) as type_name,
(SELECT GROUP_CONCAT(DISTINCT products.post_title SEPARATOR ', ') FROM wp_posts AS products WHERE products.ID IN (
SELECT meta_value FROM wp_postmeta WHERE post_id = manuals.ID AND meta_key = 'manual_products' AND products.ID IN(
/*----------------------------------
| Product Visibility
+---------------------------------*/
SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN(
SELECT term_taxonomy_id FROM wp_term_taxonomy WHERE taxonomy = 'product-visibility' AND term_id IN(
SELECT term_id FROM wp_terms WHERE wp_terms.slug IN('support-web-site','manuals-only')
)
)
)
)) as products,
/*----------------------------------
| Regions
+---------------------------------*/
(SELECT GROUP_CONCAT(DISTINCT name SEPARATOR ', ')
FROM wp_terms
WHERE term_id IN (
SELECT term_id FROM wp_term_taxonomy WHERE term_taxonomy_id IN (
SELECT term_taxonomy_id FROM wp_term_relationships WHERE object_id = manuals.ID AND taxonomy = 'region'
)
)) as regions,
/*----------------------------------
| Languages
+---------------------------------*/
(SELECT GROUP_CONCAT(DISTINCT name SEPARATOR ', ')
FROM wp_terms
WHERE term_id IN (
SELECT term_id FROM wp_term_taxonomy WHERE term_taxonomy_id IN (
SELECT term_taxonomy_id FROM wp_term_relationships WHERE object_id = manuals.ID AND taxonomy = 'language'
)
)) as languages
FROM
wp_posts as manuals
WHERE
manuals.post_type = 'manual' AND EXISTS (
SELECT 1
FROM wp_term_relationships
JOIN wp_term_taxonomy ON wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id
AND wp_term_taxonomy.taxonomy = 'language'
AND wp_term_taxonomy.term_id = '6551'
WHERE wp_term_relationships.object_id = manuals.ID
)
GROUP BY
manuals.ID
ORDER BY
products.post_title ASC