Hi i have database like this
Users Table
user_id | username | branch_id(foreignkey)| Approved_id(foreignkey)
-------------------------------------------------------------------------------
1 jprescott 2 1
2 lpausch 1 3
Branch Table
Branch_id BranchName
1 abc
2 asjdv
3 ydgfs
Approvetable
ApproveId ApprovedBy
1 Anil
2 ghouse
3 raghu
now i have 3 textboxes,how do i these fields in the textboxes
txtusername.text=username from table 1;
txtapprovedname=approved by from table 2;
txtbranchname=branchname from table 3;
when user 1 logins it should check the branch id and go to the branch table and disply the branch name,and check the approveid and go to the approvedtable and displya the approvedname in textboxes…..
now how to write a select statement for this can any one help me plz………..
1 Answer