MYSQL: Hierarchical Tree [3 levels] in one table

Imekamilika Ilichapishwa Miaka 5 iliyopita Kulipwa wakati wa kujifungua
Imekamilika Kulipwa wakati wa kujifungua

Hi.

I have a WordPress table with users and usermeta.

Every user has an ID and nearly every user has a sponsor_id.

Now I need a list of all user IDs (3 levels deep) from a specific ID.

For example: I want all three levels from the user with the ID 1:

user 202: sponsor_id = 1 (1. level)

user 245: sponsor_id = 1 (1. level)

user 355: sponsor_id = 1 (1. level)

user 410: sponsor_id = 245 (2. level)

user 425: sponsor_id = 355 (2. level)

user 533: sponsor_id = 1 (1. level)

user 568: sponsor_id = 425 (3. level)

And so on.

I need a list of IDs of all of them (3 levels deep).

MySQL WordPress

Kitambulisho cha Mradi: #17360946

Kuhusu mradi

5 mapendekezo Mradi wa mbali Ipo mtandaoni %project.latestActivity_relativeTime|badilisha%

Imetuzwa kwa:

kingsnigdho

Hi, I'm a PHP Wordpress developer. After reading your job description, I think the job is best suited to me. Currently I am working on a house renting project for a European company. This is the link: [login to view URL] Zaidi

$15 USD kwa siku 1
(Maoni 30)
4.6