Hi I need a query in MySQL for my PHP page, I give my table design 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 is when I pass arul code in data ie 101, I need to get the whole left and right of him example output as
LEFT Right
James Alex
David Prem
Sasi Kumar
if someone here can help me out without using storedprocdure, it will be very helpful and thanks in advance :)