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  |  

AspDotNetStoreFront
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

R2integrated - formerly bi4ce
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
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Reports Module ...  SQL Report based on logged in user
Previous Previous
 
Next Next
New Post 2/6/2007 1:50 PM
User is offline binaryjunky
7 posts
10th Ranked


SQL Report based on logged in user 
I have a site setup to take online orders, I wanted to drop in the reports module and run an SQL query that will display all the products that particular user has ordered? I'm no SQL guru and make most of my queries in visual editor, how do I put it in sql so the report only picks up the user ID of the current user and not all of them?

Many thanks, If you can help me with just dynamically getting the user ID I will probably be able to figure out the rest.
 
New Post 2/19/2007 8:46 AM
User is offline Tony Thompson
102 posts
9th Ranked


Re: SQL Report based on logged in user 
I believe your looking for the @UserID parameter. It returns the currently logged in user ID. Place a statement similiar to this into your SQL - "WHERE OrderUserID = @UserID"

OrderUserID is whatever the field in your table is that contains who ordered the item.
 
New Post 2/19/2007 11:36 AM
User is offline Mitch Sellers
5719 posts
www.mitchelsellers.com
3rd Ranked




Re: SQL Report based on logged in user 

That will do what you want.  I would be sure to test the functionality out quite well first however to ensure that you don't have any issues with non-authenticated users if they have access to that page.


-Mitchel Sellers
MCITP, MCPD, MCTS
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Consulting Quotes, and DNN Technical Support Services

I reccomend 3Essentials for shared hosting and BaseCamp for project management
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Reports Module ...  SQL Report based on logged in user
 


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.

 


DNN Photo Gallery
DNN Photo Gallery is a truly unique photo management module released January 1st 2006. With DNN Photo Gallery you can REALLY integrate images into your existing portal and make them look like they were designed for your site.
DNN Photo Gallery
Swirlhost Inc.
Affordable DotNetNuke Hosting, Skin Development, Custom Module Development, and DotNetNuke Consulting. We will install your preference of DNN and now host with us and get a free license for the Swirl AJAX Chatroom Module.
www.swirlhost.com
Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com

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