Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Access to Users Accounts database tableAccess to Users Accounts database table
Previous
 
Next
New Post
8/28/2007 2:37 PM
 

in our MSSQL DB the owner is SCOwner.  would this replace "U" ?  or is U the table?  When viewing the tables in MS SQL manager/ Query I don't see the field for Country, I believe this is under the "User Account"  page in DotnetNuke but when looking at the DB I can't find the corisponding fields.

 
New Post
8/28/2007 2:56 PM
 

no U is an alias...  just run the query and you will see what it does..     no idea where Country is..  I though it was in the same table.

 
New Post
8/28/2007 3:19 PM
 

Country and other profile property values are stored serialized inside userProfile table


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
8/28/2007 3:25 PM
 

 

this gives you country for registered users on Portal 0 ..   if another Portal, change that in the sql, if all users, just delete that line of sql

SELECT   
  U.FirstName,
  U.LastName,
  U.Email,
  (SELECT PropertyValue FROM UserProfile WHERE
    UserProfile.UserID = U.UserID AND
    UserProfile.PropertyDefinitionID = 29) As Country
 FROM UserPortals AS UP
   RIGHT OUTER JOIN UserRoles  UR
   INNER JOIN Roles R ON UR.RoleID = R.RoleID
   RIGHT OUTER JOIN Users AS U ON UR.UserID = U.UserID
  ON UP.UserId = U.UserID
 WHERE ( UP.PortalId = 0)
  AND (R.RoleName = 'Registered Users')
 
 ORDER BY U.FirstName + ' ' + U.LastName

 
New Post
8/28/2007 9:31 PM
 

Brian, thanks.... I works but I need more information than name, and email. How do I find out what the field names are so that I can query on the serialized ?  I tried to add U.PHone to the select statement but I got an error.  I may also want to add the crated date and last updated as well.  I know these are in the database... I'm just not sure if they are  in the table that you used to build this query.    Again how do you know about the serialized fields? 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Access to Users Accounts database tableAccess to Users Accounts database table


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out