- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2020
06:09 AM
07-20-2020
06:09 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2020
09:49 AM
07-20-2020
09:49 AM
Re: Getting cardinality violation issue order view page frontend
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/
https://www.manishmittal.com/
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2020
09:57 AM
07-20-2020
09:57 AM
Re: Getting cardinality violation issue order view page frontend
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/
https://www.manishmittal.com/
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2020
08:11 PM
07-20-2020
08:11 PM
Re: Getting cardinality violation issue order view page frontend
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!