Can someone explain why this query is not not working in phalcon framework ? it works if i run this as direct query on the db , but following
returns null as the value.
$geo_ip = new GeoIp(); echo $sql=" SELECT country FROM `geo_ip` WHERE addr_type = 'ipv4' AND ip_start <= \"".inet_pton($this->ipCheck())."\" ORDER by ip_start DESC LIMIT 1 "; $geo_ip = new \Phalcon\Mvc\Model\Resultset\Simple(null, $geo_ip , $geo_ip->getReadConnection()->query($sql)); var_dump($geo_ip->country);
Output :
SELECT country FROM `geo_ip` WHERE addr_type = 'ipv4' AND ip_start <= "{�<" ORDER by ip_start DESC LIMIT 1
NULL