|
-
Oct 18th, 2008, 05:26 PM
#1
Thread Starter
Fanatic Member
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!
Last edited by masfenix; Oct 18th, 2008 at 05:32 PM.
-
Oct 18th, 2008, 06:52 PM
#2
Addicted Member
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
-
Oct 18th, 2008, 07:59 PM
#3
Re: How to write this query..
as a side FYI - you CAN edit a post, rather than creating individual copies.
-tg
-
Oct 18th, 2008, 08:01 PM
#4
Thread Starter
Fanatic Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|