hi all, what is the best way to compare stored ip addresses with the current "request.userhostaddress" ipaddress.
i am trying to ensure that users don't do something more than once... prevent abuse.
WHAT I HAVE TRIED SO FAR....
my SQL logic...
1)pass in 2 params, 1-myContentID & 2-currentUserIP
2)Count * FROM myTable Where dbContentID = myContentID AND dbcurrentUserIP = currentUserIP
my Scripting logic...
1)pass out the 2 params and get returned count
2)if myCount > 0 then do WHATEVER else do OTHER
----------------------------------------------------------------------
i think my problem is the comparisions of IP Addresses, because it is stored as a string instead of an integer, so i can't do...
dbcurrentUserIP = currentUserIP
instead i have to do something like....
dbcurrentUserIP LIKE '%' + currentUserIP + '%'
-----------------------------------------------------------------------
still nothing works,
i would appreciate any advice,
thank you in advance,
- a8le
i am trying to ensure that users don't do something more than once... prevent abuse.
WHAT I HAVE TRIED SO FAR....
my SQL logic...
1)pass in 2 params, 1-myContentID & 2-currentUserIP
2)Count * FROM myTable Where dbContentID = myContentID AND dbcurrentUserIP = currentUserIP
my Scripting logic...
1)pass out the 2 params and get returned count
2)if myCount > 0 then do WHATEVER else do OTHER
----------------------------------------------------------------------
i think my problem is the comparisions of IP Addresses, because it is stored as a string instead of an integer, so i can't do...
dbcurrentUserIP = currentUserIP
instead i have to do something like....
dbcurrentUserIP LIKE '%' + currentUserIP + '%'
-----------------------------------------------------------------------
still nothing works,
i would appreciate any advice,
thank you in advance,
- a8le