[PHP] Re: stuck with simple query..... Plz have a look

2004-04-07 Thread Ligaya Turmelle
You need to do a join. SELECT table1.ID AS PL_NAME, table1.ID AS PC_NAME, table1.ID AS PA_NAME FROM table1, table2 WHERE (table2.PL = table1.ID) AND (table2.PC = table1.ID) and (table2.PA = table1.ID) ; Or something like that. Sorry I couldn't be of more help. Respectfully, Ligaya Turmelle "T

[PHP] Re: stuck with simple query..... Plz have a look

2004-04-07 Thread Yayati Kasralikar
Try something like is: select a.Name as PL_Name,b.Name as PC_Name,c.Name as PA_Name from (select * from table1,table2 where table1.ID=table2.PL) a, (select * from table1,table2 where table1.ID=table2.PC) b, (select * from table1,table2 where table1.ID=table2.PA) c where a.description=b.description