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

Hi Ben,

Something like this ?

SELECT DISTINCT Fullname, EmailId FROM Customer INNER JOIN User ON Customer.CustID = User.CustID

Thanks,

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.