Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Reports Module ...  Query with User Context
Previous Previous
 
Next Next
New Post 4/19/2007 8:48 AM
User is offline Rob Spotts
8 posts
10th Ranked


Query with User Context 

Background

I have a table called TBL_BLAH with a field (foreign key) called UserID that denotes that that item is assigned to that UserID.  Does anyone know how to do a query, but select only records with the current user context?

For example:

SELECT * FROM TBL_BLAH WHERE UserID={CurrentUser}

Thanks,
Rob

 
New Post 4/19/2007 2:45 PM
User is offline Andrew Nurse
366 posts
8th Ranked






Re: Query with User Context 

As long as you are running version 4.4 (or higher) of the Reports module there are 4 parameters available to you: @PortalID, @TabID, @ModuleID, and @UserID which contain the current portal ID, tab ID, module ID and user ID respectively. So to do what you want the query would be:

SELECT * FROM TBL_BLAH WHERE UserID = @UserID


Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Reports Module ...  Query with User Context
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Subzero Solutions
Dutch / English DotNetNuke consultancy services. Custom module development in any version. Complete application integration. Small business portal hosting. Your ideas our innovation - Your success our motivation. K.v.k Amsterdam: 34236342
www.subzero-solutions.net
Hosting for DotNetNuke
SiteGround.com is the best place to host your DotNetNuke website! Expert DotNetNuke support, reliable servers, low price!
www.SiteGround.com
Code Endeavors, LLC
Do you Endeavor to Enhance your DotNetNuke designs by utilizing AJAX technologies to more efficient interactive web experiences
www.codeendeavors.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP