How to write this query..
Okay, I need to update my users db in an asp.net site I made. Basically I am using a "little" modified version of the default SQLMembershipprovider.
The tables(relative to this question) look as follows:
aspnet_users
userid,
username,
lowered_username
aspnet_membership
userid,
password,
email
What I want to do
For each userid, I need their default username (and lowered_username) in aspnet_users with the email from aspnet_membership.
I want the user to be logging in with their email instead of username.
I don't really have the option to make a custom membership provider.
Thanks!
Re: How to write this query..
This will list the UserName, Lowered_UserName from the aspnet memrship table alone with the email from the aspnet membership name.
SELECT au.UserName, au.Lowered_UserName, am.Email
FROM Aspnet_User AS au INNER JOIN Aspnet_Membership AS am
ON au.UserID = am.UserID
Is this what you're looking for? Also want RDBMS are you using? This syntax will work with MS SQL and Mysql
Re: How to write this query..
as a side FYI - you CAN edit a post, rather than creating individual copies.
-tg
Re: How to write this query..
Hey yea, my enter got suck so it posted like 10 threads lol sorry about that.
anyways, thankyou. Your select statement lead me to the UPDATE statement I needed.