Hi
When using the lcr module, the DB that is created namely gw, has a int type for the ip_addr field, which means that I cant insert a IP address, if I change the column type to say varchar (so I can enter in '.'), then the data which is returned is a random IP address, (or what seems to be a random one).
Any ideas
iqbal
cheers, just what I needed..one thing though I had to reverse the format...not sure if I was doing it wrong or something else.
Anyhow for all those with the same problem manually calculating it is
IP=A.B.C.D
IPlong= A*16777216 + B*65536 + C*256 + D
but as mentioned above I for some reason had to do
D*16777216 + C*65536 + B*256 + A
Iqbal
On 3/2/2005, "Juha Heinanen" jh@lohi.tutpro.com wrote:
Iqbal writes:
Any ideas
yes, you have to put in ip_addr field integer representation of ip address. use, for example, php's ip2long function.
-- juha