![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
DMX, WindowsXP Here is what I am trying to do... I have a phone list of all our stores. It contains managers home and cell numbers for emergencies. So the list is about 44 stores and about 7 to 8 managers to each store...so that's about 350 or so numbers on this list... Now our store each have there own unique IP address, ex. Store 2 would be 192.168.2.?? So within the phone list I have, for each store I have stored the Ip like 192.168.2 or 192.168.6 and so on.. Well what I want to do is try to build a query that will only return records that are similar to the users IP... so I have a hidden request for the IP... Request.ServerVariables("REMOTE_ADDR") which I want to use as a variable in my query to compare their ip with what's in the table.. So the results would be like this... My IP 192.168.6.15 I should see ONLY records with 192.168.6 as part of the IP. Any suggestions? Ideas? not sure if this would be the place to post this, but would appreciate any help. |
#3
| |||
| |||
|
|
Hi yea, you will find that some isp's give a different IP address every time you connect to the internet. this is most common in the UK as otherwise one has to pay for a static IP address. Twocan's "Daniel_Cha" <dan_cha (AT) hotmail (DOT) com> wrote in message news:cmvsi3$8h1$1 (AT) forums (DOT) macromedia.com... DMX, WindowsXP Here is what I am trying to do... I have a phone list of all our stores. It contains managers home and cell numbers for emergencies. So the list is about 44 stores and about 7 to 8 managers to each store...so that's about 350 or so numbers on this list... Now our store each have there own unique IP address, ex. Store 2 would be 192.168.2.?? So within the phone list I have, for each store I have stored the Ip like 192.168.2 or 192.168.6 and so on.. Well what I want to do is try to build a query that will only return records that are similar to the users IP... so I have a hidden request for the IP... Request.ServerVariables("REMOTE_ADDR") which I want to use as a variable in my query to compare their ip with what's in the table.. So the results would be like this... My IP 192.168.6.15 I should see ONLY records with 192.168.6 as part of the IP. Any suggestions? Ideas? not sure if this would be the place to post this, but would appreciate any help. |
#4
| |||
| |||
|
|
DMX, WindowsXP Here is what I am trying to do... I have a phone list of all our stores. It contains managers home and cell numbers for emergencies. So the list is about 44 stores and about 7 to 8 managers to each store...so that's about 350 or so numbers on this list... Now our store each have there own unique IP address, ex. Store 2 would be 192.168.2.?? So within the phone list I have, for each store I have stored the Ip like 192.168.2 or 192.168.6 and so on.. Well what I want to do is try to build a query that will only return records that are similar to the users IP... so I have a hidden request for the IP... Request.ServerVariables("REMOTE_ADDR") which I want to use as a variable in my query to compare their ip with what's in the table.. So the results would be like this... My IP 192.168.6.15 I should see ONLY records with 192.168.6 as part of the IP. Any suggestions? Ideas? not sure if this would be the place to post this, but would appreciate any help. |
#5
| |||
| |||
|
|
IPTrimmed = Request.ServerVariables("REMOTE_ADDR") IPTrimmed = LEFT(IPTrimmed, InStrRev(IPTrimmed,".")) .... yourRS.Source = "SELECT <fields> FROM <table> WHERE IP LIKE '"&IPTrimmed&"%'" "Daniel_Cha" <dan_cha (AT) hotmail (DOT) com> wrote in message news:cmvsi3$8h1$1 (AT) forums (DOT) macromedia.com... DMX, WindowsXP Here is what I am trying to do... I have a phone list of all our stores. It contains managers home and cell numbers for emergencies. So the list is about 44 stores and about 7 to 8 managers to each store...so that's about 350 or so numbers on this list... Now our store each have there own unique IP address, ex. Store 2 would be 192.168.2.?? So within the phone list I have, for each store I have stored the Ip like 192.168.2 or 192.168.6 and so on.. Well what I want to do is try to build a query that will only return records that are similar to the users IP... so I have a hidden request for the IP... Request.ServerVariables("REMOTE_ADDR") which I want to use as a variable in my query to compare their ip with what's in the table.. So the results would be like this... My IP 192.168.6.15 I should see ONLY records with 192.168.6 as part of the IP. Any suggestions? Ideas? not sure if this would be the place to post this, but would appreciate any help. |
#6
| |||
| |||
|
|
ok, im just that blind... but what is IPTRIMMED My variable name is varIP Run-Time Value is Request.ServerVariables("REMOTE_ADDR") My current sql statement is as follows: SELECT * FROM tbEmerStore, tbIpRange WHERE tbEmerStore.Store = tbIpRange.StoreNum AND 'varIP' LIKE tbIpRange.IpRange ORDER BY Store and my Recordset is called... rsTest ---------------------- So where am i suppose to place this bit of code? IPTrimmed = LEFT(IPTrimmed, InStrRev(IPTrimmed,".")) and is IPTrimmed the name of the variable? "CMBergin" <NoHarvestForYou (AT) NoSpam (DOT) org> wrote in message news:cn087r$qtm$1 (AT) forums (DOT) macromedia.com... IPTrimmed = Request.ServerVariables("REMOTE_ADDR") IPTrimmed = LEFT(IPTrimmed, InStrRev(IPTrimmed,".")) .... yourRS.Source = "SELECT <fields> FROM <table> WHERE IP LIKE '"&IPTrimmed&"%'" "Daniel_Cha" <dan_cha (AT) hotmail (DOT) com> wrote in message news:cmvsi3$8h1$1 (AT) forums (DOT) macromedia.com... DMX, WindowsXP Here is what I am trying to do... I have a phone list of all our stores. It contains managers home and cell numbers for emergencies. So the list is about 44 stores and about 7 to 8 managers to each store...so that's about 350 or so numbers on this list... Now our store each have there own unique IP address, ex. Store 2 would be 192.168.2.?? So within the phone list I have, for each store I have stored the Ip like 192.168.2 or 192.168.6 and so on.. Well what I want to do is try to build a query that will only return records that are similar to the users IP... so I have a hidden request for the IP... Request.ServerVariables("REMOTE_ADDR") which I want to use as a variable in my query to compare their ip with what's in the table.. So the results would be like this... My IP 192.168.6.15 I should see ONLY records with 192.168.6 as part of the IP. Any suggestions? Ideas? not sure if this would be the place to post this, but would appreciate any help. |
![]() |
| Thread Tools | |
| Display Modes | |
| |