DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   how to retrieve fullname after login(asp.net/c#/sql) (http://www.daniweb.com/forums/thread167011.html)

ben2008 Jan 8th, 2009 12:00 pm
how to retrieve fullname after login(asp.net/c#/sql)
 
Hi
I am using custom database to store data. I have two tables :Customer(CustID,Fname,Lname,Fullname) and
User(UserId,Emailid,Pwd,CustID(FK))
I want to retrieve the Fullname from Customer table based on logged user's Emailid.
How to collect the EmailId and pass to sql query.
Any help appreciated.
Thanks in advance
ben

Kusno Jan 8th, 2009 11:51 pm
Re: how to retrieve fullname after login(asp.net/c#/sql)
 
Hi Ben,

Something like this ?
SELECT DISTINCT Fullname, EmailId FROM Customer INNER JOIN User ON Customer.CustID = User.CustID

Thanks,


All times are GMT -4. The time now is 7:28 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC