Hi,
I’m using the IP to Nation Module to ascertain a visitor’s county (so I can hide or show specific content depending on their location) and have achieved this with the following code:
{exp:query sql="SELECT country FROM exp_ip2nation WHERE ip < INET_ATON('<?php echo $ip; ?>') ORDER BY ip DESC LIMIT 0,1"}{country}{/exp:query}...I don’t pretend to understand the code, but it’s been working nicely 😊
I’ve just updated the site from EE2.3.1 to EE2.5.2 and the above seems to have broken. Upon visiting the site I get this error:
Error Number: 1054
Unknown column ‘ip’ in ‘where clause’
SELECT country FROM exp_ip2nation WHERE ip < INET_ATON(‘62.133.4.234’) ORDER BY ip DESC LIMIT 0,1
Filename: modules/query/mod.query.php
Line Number: 181
Just wondered if anyone had any ideas what the problem might be.
IP to Nation version is 3.0.
I must also say that I’ve attempted the update to 2.5.2 on a copy of the actual site, so I may have done something daft when copying the site across (although the copy appeared to be working fine before the update).
Any guidance would be greatly appreciated. Thanks!