How to Get Category Name by Category ID Using SQL in Magento 2

Get Category Name by Category ID Using SQL in Magento 2

Categories are extremely important to differentiate products in E-commerce stores. Whether it is small, medium or large-sized Magento 2 store, the categories help the store owner to separate products and services with category names.

After creating categories in Magento 2, while loading and debugging the category page, the Magento developers sometimes only get category ID in the URL. The category name should appear on the page.

Every category name contains a category ID. Manually finding bulk of the category names by category IDs from the backend is a time-consuming process.

Therefore, I have come up with a solution to get category name by category ID using SQL in Magento 2.

Programmatic Solution to Get Category Name by Category ID Using SQL in Magento 2

Replace <Your Category Id> with your category ID.

Done! Isn’t it simple?

If you have queries regarding the post, feel free to ask in the Comment section below.

I would like to solve your queries.

Also, do not forget to share this post with Magento Community via social media.

Thank you.

Related Post:

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

5
(based on 11 Reviews)

Yash is a Magento Developer at Meetanshi. He loves playing computer games and watching action movies. For brain exercise, he likes to play Chess.

Leave a reply:

Your email address will not be published.