Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql ip address data type

-- `ip_address` int(4) unsigned NOT NULL
INSERT INTO my_table (`ip_address`) VALUES (INET_ATON("127.0.0.1"));
SELECT INET_NTOA(ip_address) as ip FROM my_table;
-- php
<?php
var_dump(ip2long('123.63.153.253'));	-- 2067765757
var_dump(long2ip(2067765757));			-- "123.63.153.253"
?>
Comment

PREVIOUS NEXT
Code Example
Sql :: sql server select first day of previous year 
Sql :: search mysql database for column 
Sql :: sqlite autoincrement 
Sql :: how to transfer pandas datafra,e to sqlite 
Sql :: SELECT exists sql 
Sql :: set open file limit mac catalina mysql 
Sql :: unsigned int in mysql 
Sql :: mysql failed to login as root@localhost 
Sql :: DATE_SUB postgres 
Sql :: oracle running queries 
Sql :: add primary key with auto increment to existing table column mysql 
Sql :: mysql select true or false 
Sql :: how to select one row in mysql 
Sql :: duplicate entry 
Sql :: sql server datetime to string 
Sql :: DATEDIFF minute postgres 
Sql :: sql counter column 
Sql :: sql update statement 
Sql :: sql change date format 
Sql :: mssql dockere 
Sql :: pyspark sql row get value 
Sql :: sql show table info 
Sql :: flask sqlalchemy update row 
Sql :: enter mysql command line 
Sql :: mysql count multiple columns in one query 
Sql :: how to add month in update sql 
Sql :: T-SQL - Delete Column 
Sql :: c# update sql statement 
Sql :: unique key in ms sql server 
Sql :: is numeric in sql 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =