Jump to content

Query that gets chained records


davidtheo

Recommended Posts

Hi All,

 

I would like to know is there a way I can get chained records from MySQL in a single query.

 

Table

 

Id

Parent_id

Number

 

Data

id        parent_id        number

1              null                1

2                1                  3

4                2                10

6                3                100

 

I need a query that will get all records where parent_id = id where I what the records where number = 1;

 

Can anyone help me?

 

 

Link to comment
https://forums.phpfreaks.com/topic/217835-query-that-gets-chained-records/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.