i have three table
1st viewleave
2nd applyleave
3rd personal
based on the leaveid in viewleavetable i wnt to fetch the spid in the second table,based on the spid i want to select spid email address........please tell how to do tat..
CREATE TABLE `viewleave` (
`leaveid` varchar(25) NOT NULL,
`message` varchar(500) NOT NULL
)
CREATE TABLE `applyleave` (
`leaveid` int(11) NOT NULL auto_increment,
`spid` varchar(25) NOT NULL
PRIMARY KEY (`leaveid`)
)
CREATE TABLE `personal` (
`spid` varchar(25) NOT NULL,
`email` varchar(60) NOT NULL,
)