Welcome Guest, Not a member yet? Register   Sign In
DB Query Question
#1

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
Reply


Messages In This Thread
DB Query Question - by soneax - 12-05-2018, 03:15 AM
RE: DB Query Question - by neuron - 12-05-2018, 03:54 AM
RE: DB Query Question - by soneax - 12-05-2018, 05:19 AM
RE: DB Query Question - by soneax - 12-05-2018, 05:40 AM
RE: DB Query Question - by neuron - 12-05-2018, 11:18 PM
RE: DB Query Question - by soneax - 12-06-2018, 04:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB