select email from personal where spid=(select spid from applyleave where leaveid=(select leaveid from viewleave where leaveid="specify your leaveid here"))
Hi.. Try this and let me know if this works..
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
That means there are many records with the same spid. You can change the above query to,
select email from personal where spid IN (select spid from applyleave where leaveid IN (select leaveid from viewleave where leaveid="specify your leaveid here"))
Cheers.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
just add another condition !
SELECT * from attend where (day1 between '$from' and '$to') and spid='$id' :)
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356