cancel
Showing results for 
Search instead for 
Did you mean: 

Getting cardinality violation issue order view page frontend

Getting cardinality violation issue order view page frontend

SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s), query was: SELECT `catalog_category_entity`.* FROM `catalog_category_entity` WHERE (entity_id ='2', '3', '14', '25', '7', '9', '10')
Exception #1 (PDOException): SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)

 I am getting this above error on order view page (http://127.0.0.1/dnourm2/sales/order/view/order_id/59/). Unable to debug this issue. We are using venus theme. Please suggest me ASAP.

3 REPLIES 3

Re: Getting cardinality violation issue order view page frontend

@tippanna_pawar 

 

You are doing wrong at

entity_id ='2', '3', '14', '25', '7', '9', '10'

you can not use = with multiple value. You need to use IN instead.

Manish Mittal
https://www.manishmittal.com/

Re: Getting cardinality violation issue order view page frontend

@tippanna_pawar 

 

Please check if you are using any 3rd party module or print order items collection query this should be correct. If product have multiple categories assigned then here it should come IN instead =. 

Manish Mittal
https://www.manishmittal.com/

Re: Getting cardinality violation issue order view page frontend

Hi @tippanna_pawar 

 

Try below query :

SELECT `catalog_category_entity`.* FROM `catalog_category_entity` WHERE (`entity_id` IN('2', '3','14', '25', '7', '9', '10'))

If this working fine with db, then replace query from code and check.

It may help you!
Problem Solved? Please click on 'Accept as Solution'!

Problem solved? Click Accept as Solution!