I am trying to store ip addresses into my database and I am using INET_ATON
as below,
$sql = "
INSERT INTO pin (
page_id,
user_id,
pc_name,
ip,
geolocation,
created_on
)VALUES(
?,
?,
?,
?,
?,
NOW()
)";
$result = $this->connection->executeSQL($sql,array(
$this->page_id,
$this->user_id,
$this->getComputerName(),
'INET_ATON("123.136.106.104")',
$this->getGeoLocation()
));
But I can't get it converted or saved into the ip
field in the db. I get 0
instead of number.
What should I do? What have I done incorrectly with the SQL?