This topic is locked
[SOLVED]

 Display Information Base On "Zone" Base On SESSION("UserName")

8/8/2014 12:24:14 PM
ASPRunnerPro General questions
G
gonzalosb author

Hi All,

i need to display records from TABLE1 base on TABLE2"Zone" witch is base on TABLE3"SESSION("UserName")"



TABLE 3

UserName - FullName - Password

test@test.com John Doe 1234




TABLE 2

Zone - FlllName

1 John Doe

2

3 John Doe




TABLE 1

Zone - Record - Color - Year

1 Building grey 1994

1 Building black 1995

2 Home red 1904

2 Home red 1905

3 Building blue 1936

3 Building red 1937


I use SESSION("UserName")= data("FullName")

it should display only Zone 1 and 3 to this user base on table2
thanks in advance

lefty 8/9/2014



Hi All,

i need to display records from TABLE1 base on TABLE2"Zone" witch is base on TABLE3"SESSION("UserName")"



TABLE 3

UserName - FullName - Password

test@test.com John Doe 1234




TABLE 2

Zone - FlllName

1 John Doe

2

3 John Doe




TABLE 1

Zone - Record - Color - Year

1 Building grey 1994

1 Building black 1995

2 Home red 1904

2 Home red 1905

3 Building blue 1936

3 Building red 1937


I use SESSION("UserName")= data("FullName")

it should display only Zone 1 and 3 to this user base on table2
thanks in advance



Where are you putting the SESSION("UserName")= data("FullName") and which field do you use it in . Is it in a dropdown selection. Need more info . Post code.

G
gonzalosb author 8/11/2014

SESSION("UserName")=data("FullName") is on after successful logon
so SESSION("UserName") will be John Doe.
Table1 list page (http://www.mysite.com/Table1_List.asp) display all records on that table
no CODE to post at the moment because is non. all the tables are separated.
i need an IF expression to relate all 3 TABLES before TABLE1 display the list

G
gonzalosb author 8/11/2014

i start working on a CODE, something like:



‘Calling Zone from Table2
IF ZoneID=”” then

sql = "select *from Table2 where FullName like SESSION("UserName")"

set data=CustomQuery (sql)

Zone=Zone & data(“Zone”)

End if
‘If Zone from Table2 is equal to SESSION(“UserName”) as ZoneID then
IF data(“Zone”)<>ZoneID then

record(“Zone”)=true

End if
‘Should display zones fromTable1 base on Zone with FullName like SESSION(“UserName”)



But doesn’t work, I missing something on the first IF from Table2