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  |  

telerik -- supercharge your DNN websites
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
 


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.

 


Icthus Technologies
Building Faith on the Internet
www.icthustech.com
Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com
DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com

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