Results 1 to 4 of 4

Thread: How to write this query..

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    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!

  2. #2
    Addicted Member
    Join Date
    Oct 2008
    Location
    Califorina
    Posts
    235

    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

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: How to write this query..

    as a side FYI - you CAN edit a post, rather than creating individual copies.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    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
  •  



Click Here to Expand Forum to Full Width