Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Jester_boy #1
Problem filtering Data through Multiple Recordsets
Hello, I am currently working on a profile page that users will go to once they
log in to our website. The profile page will show the users contact
information, as well as show any additional items that are relavent to the user
like outstanding orders, missing documents etc... How I have this set up is,
there is a table in the database that has all the user's info like name, pass,
address, etc.. They login to the site and it validates it baised off that
table. Then when they click on the profile link it takes them to the 'Profile'
page. Once they enter the the profile page I can get the recordset to filter
based off of MM_Username and so that recordset loads just fine. But in the
second, and third section I want to be able to show the records off a second
and third recordset. Now in each table I have a field called salesrepcode that
I would like to use to tie all off the records together. So Ideally the page
will show just the records associated to that user. Can anyone help me figure
out how I can filter the second and third recordsets? Thanks in advance!
Section#1 Welcome User - Recordset#1 - Table Users
:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::
::::::::::::: Section#2 Users Information, Address, phone, etc... Recordset#1 -
Table Users
:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::
::::::::::::: Section#3 Order History - Recordset#2 - Table SalesRecords
:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::
::::::::::::: Section#4 Missing Paperwork - Recordset#3 - Table MissingDocs
:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::
:::::::::::::
Jester_boy Guest
-
Multiple Recordsets
OK, I know there has to be a better way to do this, hopefully someone can shed some light on this subject. Using SQLServer 2000 and VBscript... -
problem with filtering data
Hello, I have a simple table containing adresses. A sample view of the table is id name city -------------------------------- 100 ... -
Multiple recordsets?
Hey all I'm not sure if there's anything that can be done about this or not. I'm displaying the contents of two different tables (using Access for... -
Getting Multiple Recordsets from an SP
I am using ASP 3.0/ADO to call an SP. The SP has multiple SELECT statements so I need to get the multiple return sets but I cannot find the right... -
Should open multiple recordsets, or just one?
Hi, I find myself once again returning to a problem project I have been so far unable to finish... I have a table of teaching session data and... -
Paul Whitham TMM #2
Re: Problem filtering Data through Multiple Recordsets
I would assume that the User ID is also in the other tables. If this is so
then just apply whatever filter you have in the first to the other
recordsets.
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"Jester_boy" <webforumsuser@macromedia.com> wrote in message
news:d0l8lv$mei$1@forums.macromedia.com...they> Hello, I am currently working on a profile page that users will go to onceuser> log in to our website. The profile page will show the users contact
> information, as well as show any additional items that are relavent to theis,> like outstanding orders, missing documents etc... How I have this set uppass,> there is a table in the database that has all the user's info like name,'Profile'> address, etc.. They login to the site and it validates it baised off that
> table. Then when they click on the profile link it takes them to thefilter> page. Once they enter the the profile page I can get the recordset tosecond> based off of MM_Username and so that recordset loads just fine. But in the
> second, and third section I want to be able to show the records off athat> and third recordset. Now in each table I have a field called salesrepcodepage> I would like to use to tie all off the records together. So Ideally thefigure> will show just the records associated to that user. Can anyone help me:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::> out how I can filter the second and third recordsets? Thanks in advance!
> Section#1 Welcome User - Recordset#1 - Table Users
>
::::Recordset#1 -> ::::::::::::: Section#2 Users Information, Address, phone, etc...:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::> Table Users
>
:::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::> ::::::::::::: Section#3 Order History - Recordset#2 - Table SalesRecords
>
::::MissingDocs> ::::::::::::: Section#4 Missing Paperwork - Recordset#3 - Table:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::>
::::> :::::::::::::
>
Paul Whitham TMM Guest
-
Jester_boy #3
Re: Problem filtering Data through Multiple Recordsets
Actually the user id is only in the first table the session validates and
authenticates against the userid and password. I am using salesrepcode to be
constant with all of the tables. I guess I could have them log on with
salesrepcode, but ideally I would like to keep that reserved so if I have to
change usernames etc I can. So I am trying to Login(session) - go to index -
then profile sheet where the employee table will show user details (employees
table) and below it I
Jester_boy Guest
-
Paul Whitham TMM #4
Re: Problem filtering Data through Multiple Recordsets
Okay that is not that difficult, assuming that in your login table you are
also storing the salesrepcode.
If you have a look at the code on the login user script generates you will
find that the session variable is set inside of an IF statement, that is
based on the recordset containing items. Simple create a second session
variable and assign the salesrepcode to it like this
session("svSaleRep") = recordset.fields.Item("salesrepcode").value
Then you can use this second session variable to filter the other recordsets
--
Regards
Paul Whitham
Macromedia Certified Professional for Dreamweaver MX2004
Valleybiz Internet Design
[url]www.valleybiz.net[/url]
Team Macromedia Volunteer for Ultradev/Dreamweaver MX
[url]www.macromedia.com/support/forums/team_macromedia[/url]
"Jester_boy" <webforumsuser@macromedia.com> wrote in message
news:d0lcrb$sip$1@forums.macromedia.com...be> Actually the user id is only in the first table the session validates and
> authenticates against the userid and password. I am using salesrepcode toto> constant with all of the tables. I guess I could have them log on with
> salesrepcode, but ideally I would like to keep that reserved so if I haveindex -> change usernames etc I can. So I am trying to Login(session) - go to(employees> then profile sheet where the employee table will show user details> table) and below it I
>
Paul Whitham TMM Guest
-
Jester_boy #5
Re: Problem filtering Data through Multiple Recordsets
Paul, Thanks for the reply. I am not 100% on what you mean. Here is the code I
am using for validating the login. It appears to use a couple IF statements.
<% // *** Restrict Access To Page: Grant or deny access to this page var
MM_authorizedUsers='1,2,3,4,5,6,7,8'; var MM_authFailedURL='../login.asp'; var
MM_grantAccess=false; if (String(Session('MM_Username')) != 'undefined') { if
(false || (String(Session('MM_UserAuthorization'))=='') ||
(MM_authorizedUsers.indexOf(String(Session('MM_Use rAuthorization'))) >=0)) {
MM_grantAccess = true; } } if (!MM_grantAccess) { var MM_qsChar = '?';
if (MM_authFailedURL.indexOf('?') >= 0) MM_qsChar = '&'; var MM_referrer
= Request.ServerVariables('URL'); if (String(Request.QueryString()).length >
0) MM_referrer = MM_referrer + '?' + String(Request.QueryString());
MM_authFailedURL = MM_authFailedURL + MM_qsChar + 'accessdenied=' +
Server.URLEncode(MM_referrer); Response.Redirect(MM_authFailedURL); } %>
Jester_boy Guest
-
Jester_boy #6
Re: Problem filtering Data through Multiple Recordsets
I think we are headed on the right path of the second session variable can
anyone help me with creating it? Can I do it in Dreamweaver or is it only via
the code that it can be done? Any help would be greatly appreciated. Thanks,
Jester
Jester_boy Guest



Reply With Quote

