Check whether your version of mysql supports sub queries.
Subquery support was added in version 4.1.
If your version of mysql does'nt support subqueries.
then a workaround for your particular case..
Query 1 >> "select EmpID from rightlinks where RightID=3"
building up a string with your first Query like
11,12,13,14 which are EmpID seperated by comma and use the
generated string in the next query.
Query 2>>"select EmpID, EmpName from Employees where EmpID IN (11,12,13,14 )"
~Regards
jmukesh
|