Hi,
I have a MySQL table with: user.id, user.name, user.refer_id
I would like to query the DB once passing the user.id value, but i would like to use the same query to retrieve the refer name based on his ID too. It is possible?
Basically i want to get the user based on his ID and consequently the 'Refer Name' of that user based on the refer_id.
Table Example:
ID Name Refer_id
1 John 2
2 Alex 3
3 Peter 1