when i execute this query
SELECT
tbcategory.CATEGORY_ID,
tbcategory.VENDOR_ID,
tbcategory.CATEGORY_NAME,
tbsubcategory.SUB_CATEGORY_ID,
tbsubcategory.SUB_CATEGORY_NAME,
PRODUCT_ID,
PRODUCT_NAME,
PRODUCT_DESC,
GENERAL_PRICE,
RESELLER_PRICE,
SPECIAL_PRICE,
PRODUCT_SHOT_DESC,
MANUFACTURE_PART_NUM,
SKU_ID,
IMAGE
FROM
tbproduct,
tbcategory,
tbsubcategory
WHERE
tbsubcategory.CATEGORY_ID = tbcategory.CATEGORY_ID
AND tbsubcategory.SUB_CATEGORY_ID = tbproduct.SUBCATEGORY_ID
AND tbcategory.CATEGORY_ID IN (SELECT
tbcategory . *
FROM
tbcategory
JOIN
tbcustomer ON FIND_IN_SET(tbcategory.CATEGORY_ID,
tbcustomer.ASSIGNED_CATEGORIES)
WHERE
USER_NAME = 'clark' AND password = '420' UNION SELECT
CATEGORY_ID
FROM
tbcategory,
tbvendor
WHERE
tbvendor.USER_NAME = 'wong'
AND tbvendor.PASSWORD = '143'
AND tbvendor.VENDOR_ID = tbcategory.VENDOR_ID)
ORDER BY tbcategory.CATEGORY_ID , tbsubcategory.SUB_CATEGORY_ID , tbproduct.PRODUCT_ID;
am getting Error Code : 1241 Operand should contain 1 column(s)
In your subquery you should select one column in order to match with category id
AND tbcategory.CATEGORY_ID IN
(SELECT
tbcategory.CATEGORY_ID <----- here
FROM
tbcategory
JOIN tbcustomer
ON FIND_IN_SET(
tbcategory.CATEGORY_ID,
tbcustomer.ASSIGNED_CATEGORIES
) .....