I am trying to run query in Magento 2 Db and getting the error:
>Column 'product_id' in order clause is ambiguous,
The query is:
SELECT
main_table
.* FROM wishlist_item
AS main_table
INNER JOIN cataloginventory_stock_status
AS stockItem
ON stockItem.product_id = main_table.product_id AND stockItem.stock_status = 1
INNER JOIN catalog_category_product_index_store1
AS cat_index
ON cat_index.product_id = main_table.product_id AND cat_index.category_id = '2'
AND cat_index.visibility IN (3, 2, 4)
WHERE (wishlist_id
= '1') AND (main_table
.store_id
IN('1'))
ORDER BY find_in_set(product_id,'1,2,3'), name ASC
LIMIT 12
How to fix this?
Asked by Anees ahmad
(1 rep)
Feb 25, 2021, 03:51 PM
Last activity: Feb 26, 2021, 05:09 AM
Last activity: Feb 26, 2021, 05:09 AM