Hi, I need a query in MySQL for my PHP page, I give a table with data:
tablename: tcustomers
Name, LeftID, RightID, Code
---------------------------
Arul 102 103 101
James 104 105 102
Alex 106 107 103
David 108 109 104
Sasi 110 111 105
Prem 112 113 106
Kumar 114 115 107
what i need when i pass the arul code in the data, i.e. 101, i need to get all left and right from it, like for example
LEFT Right
James Alex
David Prem
Sasi Kumar
if someone here can help me without using a stored procedure, it will be very useful and thanks in advance :)
source
share