Gossamer Forum
Home : Products : DBMan : Customization :

Sort query based on User ID

Quote Reply
Sort query based on User ID
I would like to run a query with a sort field of the currently logged in user. I've successfully set up dbman to use .htpass for validation and am very pleased with the single login.

I have a problem constructing a query though:

This existing query, which is set up as a SSI, runs fine and brings up the modify records screen for records assigned to the user TFF to let him pick which record to modify:

<!--#include virtual="/cgi-bin/bocacomm/db/db.cgi?db=tododefault&uid=&SubmitDate=&ID=&Client=&Type=---&Description=&RequireDate=&Assign=TFF&keyword=&mh=10&sb=---&so=ascend&modify_form=Search">

However, I can't figure out how to pass the contents of the environment variable REMOTE_USER, which is also the validated userid for dbman, as the command line variable for the sort. I need to replace TFF with something like $userid, but I can't pass that

This change will let each user see each of the entries "Assigned" to them. They did not necessarily create all of then entries, though, so they are not the owners of each record.

Searching....