Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7564729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:58:12+00:00 2026-05-30T13:58:12+00:00

From a SQL Query I need to know how does magento key the related

  • 0

From a SQL Query I need to know how does magento key the related products to the actual product itself. I read a lot of useful tips on how to do with with php

$collection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSort('name', 'ASC');

But I need to know how to identity these groups to a id with mysql.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:58:14+00:00Added an answer on May 30, 2026 at 1:58 pm

    For a related product Magento uses catalog_product_link table.

    In it you have product id, related product and link type.

    To see all link types you can check the catalog_product_link_type table.

    SELECT link.link_id, link.product_id, link.linked_product_id, link.link_type_id, type.code 
    FROM catalog_product_link link 
      LEFT JOIN catalog_product_link_type type ON link.link_type_id = type.link_type_id
    WHERE 
      code = 'super' -- grouped products
      AND linked_product_id IN (123456) -- child simple product(s)
    ;
    

    More extensive information can be found with this link:
    online Database Diagram Tool dedicated to Magento eCommerce CE Edition

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need to query my SQL server from Access using an ADO connection (for example),
I need to write a SQL query which will get me those rows from
I need to execute a SQL Query between two databases. Example: SELECT * from
I need a SQL query that returns ContactDate, SortName, City, ContactType, and Summary from
Does anyone know how to select entries from SQL table where first record from
I have a result from an SQL query that I would like to sort
If I remove all the ' characters from a SQL query, is there some
how to store a value returned from a sql query in a variable in
How do I return the everything in a string from a sql query before
How i can parse and extract the parameters from an SQL Query using delphi?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.