SELECT
PCFV.id,
PCFV.value,
PCFV.slug,
COUNT(*) AS total_products
FROM product_custom_field_values PCFV
JOIN product_details PD
ON PD.product_custom_field_id = 30
AND CONCAT(',', PD.product_custom_field_value, ',') LIKE CONCAT('%,', PCFV.id, ',%')
JOIN products P
ON P.id = PD.product_id
AND P.status = 'Live'
AND pd.product_id IN (2110,2115,2116,2117)
WHERE
PCFV.value != ''
AND PCFV.product_custom_field_id = 30
GROUP BY PCFV.id
ORDER BY PCFV.orders, PCFV.value
Warning (512): Could not render cell - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'pd.product_id' in 'on clause' [/var/www/vhosts/eurowines.co.uk/httpdocs/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php, line 39] [CORE/src/View/Cell.php, line 262]Code Context } catch (Exception $e) {
trigger_error(sprintf('Could not render cell - %s [%s, line %d]', $e->getMessage(), $e->getFile(), $e->getLine()), E_USER_WARNING);
$e = object(PDOException) {
errorInfo => [
(int) 0 => '42S22',
(int) 1 => (int) 1054,
(int) 2 => 'Unknown column 'pd.product_id' in 'on clause''
]
[protected] message => 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'pd.product_id' in 'on clause''
[protected] code => '42S22'
[protected] file => '/var/www/vhosts/eurowines.co.uk/httpdocs/vendor/cakephp/cakephp/src/Database/Statement/MysqlStatement.php'
[protected] line => (int) 39
}Cake\View\Cell::__toString() - CORE/src/View/Cell.php, line 262
include - APP/Template/Element/Front/product_sidebar_tabs.ctp, line 49
Cake\View\View::_evaluate() - CORE/src/View/View.php, line 1419
Cake\View\View::_render() - CORE/src/View/View.php, line 1380
Cake\View\View::_renderElement() - CORE/src/View/View.php, line 1855
Cake\View\View::element() - CORE/src/View/View.php, line 783
include - APP/Template/Products/index.ctp, line 158
Cake\View\View::_evaluate() - CORE/src/View/View.php, line 1419
Cake\View\View::_render() - CORE/src/View/View.php, line 1380
Cake\View\View::render() - CORE/src/View/View.php, line 880
Cake\Controller\Controller::render() - CORE/src/Controller/Controller.php, line 796
Cake\Http\ActionDispatcher::_invoke() - CORE/src/Http/ActionDispatcher.php, line 126
Cake\Http\ActionDispatcher::dispatch() - CORE/src/Http/ActionDispatcher.php, line 94
Cake\Http\BaseApplication::__invoke() - CORE/src/Http/BaseApplication.php, line 235
Cake\Http\Runner::__invoke() - CORE/src/Http/Runner.php, line 65
Cake\Routing\Middleware\RoutingMiddleware::__invoke() - CORE/src/Routing/Middleware/RoutingMiddleware.php, line 162